[wp-trac] [WordPress Trac] #27934: $wp_plugin_paths is null in plugin_basename
WordPress Trac
noreply at wordpress.org
Sun Apr 20 08:18:25 UTC 2014
#27934: $wp_plugin_paths is null in plugin_basename
--------------------------+-----------------------------
Reporter: dsawardekar | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 3.9
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
While upgrading to 3.9.0 I noticed a few PHP notices in plugin.php. The
upgrade was successful but I have strict error reporting turned on in
PHP that showed up these errors.
{{{
Warning: Invalid argument supplied for foreach() in /var/www/wp-dev/wp-
includes/plugin.php on line 623
}}}
I'm using PHP 5.5.3 on Ubuntu, with individually symlinked plugins in
`wp-content/plugins`.
Further investigation revealed that the cause is to do with parent
directory extraction in the `plugin_basename` method.
Attached is a patch that adds a null check to the for loop that makes
this Notice go away.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27934>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list