Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#16547 closed defect (bug) (fixed)

suppressed PHP Warning on Install Plugins table

Reported by: dd32's profile dd32 Owned by: dd32's profile dd32
Milestone: 3.2 Priority: normal
Severity: normal Version: 3.0
Component: Plugins Keywords: has-patch 3.2-early
Focuses: Cc:

Description (last modified by dd32)

When browsing potential plugins to install, If a plugin is installed, it'll trigger a Notice. This notice is suppressed by @, Thank you Debug bar for debugging the buged.

One is caused by closedir() being called with a null param ($plugin_subdir) - which is caused by the fact that it's not set in all cases. If the function never deals with a folder with a subdirectory, then it'll be unset.

In this case, It looks like the closedir() calls need to be placed in batter spots, ideally, after the directory resource is finished being in use, see patch.

This is in no-way a recent bug, and appears to have been introduced a long time ago.

Attachments (1)

16547.diff (652 bytes) - added by dd32 14 years ago.

Download all attachments as: .zip

Change History (6)

@dd32
14 years ago

#1 @dd32
14 years ago

  • Status changed from new to accepted

the error suppression can probably be removed now as well, since neither should ever produce a warning.

#2 @dd32
14 years ago

  • Description modified (diff)

#3 @dd32
14 years ago

  • Milestone changed from Future Release to 3.2

#4 @dd32
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [17617]) Move closedir() to better locations to prevent the need for error suppression, prevents suppressed Warnings/Notices to be thrown during Plugin Installation. Fixes #16547

#5 @dd32
14 years ago

note, Commit removes a uneeded branch of return as well. The following line will perform the exact same logic.

Note: See TracTickets for help on using tickets.