[wp-trac] [WordPress Trac] #39766: Plugin does not gracefully fail when editing active plugin causes fatal error
WordPress Trac
noreply at wordpress.org
Thu Feb 2 11:39:54 UTC 2017
#39766: Plugin does not gracefully fail when editing active plugin causes fatal
error
----------------------------+-----------------------------
Reporter: ovann86 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version: 4.7.2
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
When editing an active plugin in the wp-admin you see the following
message above the 'Update file' button.
{{{
Warning: Making changes to active plugins is not recommended. If your
changes cause a fatal error, the plugin will be automatically deactivated.
}}}
However, if an edit causes a fatal error the plugin is not automatically
deactivated - resulting in the "white screen of death".
Similarly, attempting to activate a plugin that contains a fatal error
will automatically deactivate the plugin.
'''Steps to reproduce'''
1. In the WordPress Administration, go to Plugins-> Installed Plugins
2. For an active plugin, click on the 'Edit' link
3. Add erroneous code to plugin, for example
{{{
// DO NOT ADD THIS TO YOUR PLUGIN - IT WILL CAUSE A FATAL ERROR -- MISSING
CLOSING endif;
if ( ! function_exists( 'wp_password_change_notification' ) ) :
function wp_password_change_notification( $user ) {
return;
}
}}}
4. Click 'Update File'
5. Changes are saved to the plugin, page loads and confirmation "File
edited successfully." is displayed
6. Attempt to load another page (for example, the same page or the home
page) and the "white screen of death" occurs.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39766>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list