Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#1116 closed defect (bug) (fixed)

fread() warning when saving a template with no data

Reported by: anonymousbugger's profile anonymousbugger Owned by: ryan's profile ryan
Milestone: Priority: normal
Severity: minor Version: 1.5
Component: Administration Keywords:
Focuses: Cc:


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 on line 75

Attachments (1)

theme-editor.php.diff (417 bytes) - added by anonymousbugger 19 years ago.

Download all attachments as: .zip

Change History (5)

#1 @anonymousbugger
19 years ago

  • Patch set to No

#2 @MC_incubus
19 years ago

  • Patch changed from No to Yes

Patch changes:
if (!$error) {

if (!$error && filesize($real_file) > 0) {

We don't want to try reading the file if it has zero length. Thanks, anonymous!

#3 @ryan
19 years ago

  • Owner changed from anonymous to rboren
  • Status changed from new to assigned

#4 @ryan
19 years ago

  • fixed_in_version set to 1.5.1
  • Resolution changed from 10 to 20
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.