[wp-trac] [WordPress Trac] #36709: Symlinked plugin path incorrectly registered during uninstall
WordPress Trac
noreply at wordpress.org
Thu Apr 28 21:23:03 UTC 2016
#36709: Symlinked plugin path incorrectly registered during uninstall
----------------------------+-----------------------------
Reporter: andy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: trunk
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
The `dirname()` shouldn't be here in `uninstall_plugin()`:
{{{
wp_register_plugin_realpath( WP_PLUGIN_DIR . '/' .
dirname( $file ) );
}}}
`wp_register_plugin_realpath()` calls `dirname( $file );` to remove the
basename. The basename must be included in the argument or the symlinked
directory won't be registered. Then, if `uninstall.php` does this check it
will fail:
{{{
if ( dirname( WP_UNINSTALL_PLUGIN ) != dirname( plugin_basename( __FILE__
) ) )
exit();
}}}
This was observed while trying to uninstall Jetpack which was installed as
a symlink. The result was a WSOD. Removing the `dirname()` from
`uninstall_plugin()` fixes the path registration and allows the check to
pass.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36709>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list