-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notice if Xdebug extension is loaded #3198
Add notice if Xdebug extension is loaded #3198
Conversation
Co-Authored-By: Weston Ruter <westonruter@google.com>
Co-Authored-By: Weston Ruter <westonruter@google.com>
Updated per your feedback @westonruter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I'll wait for a +1 from @schlessera before merging.
This should never have been added. If something in your plugin is making websites crash when xdebug is enabled, then surely shouldn’t the issue in your plugin be fixed rather than advising the user to disable the extension? It’s not the users fault for having xdebug enabled, and most of the time it’s intentionally enabled so there should be no reason to force users to have to see a notice saying they’re doing something wrong. There’s obviously an issue in the coding of your plugin that needs fixing. |
@leecollings if it bothers you so much, you can remove it yourself in another plugin with just this: remove_action( 'admin_notices', '_amp_xdebug_admin_notice' ); |
I've created a new issue to discuss the placement of the warning: #3499. |
As discovered in #1915 (comment), xdebug can cause AMP stylesheet parsing to take much longer than normal and potentially crash the site due to maximum execution limit timeout.
This PR adds a notice to inform the user of the potential risk.
I would expect perhaps the wording should maybe change, if so, just let me know!
Screenshot