Opened 20 years ago
Closed 20 years ago
#1116 closed defect (bug) (fixed)
fread() warning when saving a template with no data
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 1.5 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
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.
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!