Opened 21 years ago
Closed 21 years ago
#1116 closed defect (bug) (fixed)
fread() warning when saving a template with no data
| Reported by: | anonymousbugger | Owned by: | ryan |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 1.5 |
| Severity: | minor | Keywords: | |
| Cc: | Focuses: |
Description
You get the following warning when opening a file in the template editor that's empty. Everything still appears to work fine.
Warning: fread(): Length parameter must be greater than 0. in example.com/wp/wp-admin/theme-editor.php on line 75
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Patch changes:
if (!$error) {
to:
if (!$error && filesize($real_file) > 0) {
We don't want to try reading the file if it has zero length. Thanks, anonymous!