-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Handle errors emitted while applying wp_template_enhancement_output_buffer filters doing the wp_finalized_template_enhancement_output_buffer action
#10310
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
Closed
westonruter
wants to merge
26
commits into
WordPress:trunk
from
westonruter:trac-64108-errors-emitted-during-output-buffer-callback
+546
−50
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
fcc23c8
Capture errors emitted while applying wp_template_enhancement_output_…
westonruter 623994b
Merge branch 'trunk' into trac-64108-errors-emitted-during-output-buf…
westonruter f6034e1
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develo…
westonruter 716a9be
Remove redundant E_ALL
westonruter d9c167a
Restore error handler only after the wp_send_late_headers action has …
westonruter 27d9e83
Catch exceptions when firing hooks in output buffer callback
westonruter 991e191
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develo…
westonruter 39c6d92
Improve error handling and add tests
westonruter ef1b4b4
Display exceptions and user errors as errors not warnings
westonruter 4d7a459
Suppres false positive for phpstan
westonruter e6029bb
Update action name
westonruter 24b3171
Improve variable assignment location
westonruter 231db4b
Add test coverage for errors in action
westonruter 5607d30
Harmonize catch blocks
westonruter bb7aeaf
Improve docs about not printing during callbacks
westonruter e39794e
Remove TODO
westonruter 2a359df
Remove todo
westonruter dd9bbdf
Opt to display errors which occur during finalize action
westonruter 2fe5542
Improve handling of html_errors and add support for error_prepend_str…
westonruter cc31d80
Fix phpcs
westonruter 5b13a71
Account for display_errors being stderr
westonruter 2ef5af1
Add test case for display_errors=stderr
westonruter 2d9bdd4
Use Throwable instead of Exception when catching
westonruter da8e3f6
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develo…
westonruter 0d580b8
Break up sprintf() into multiple lines
westonruter a8e7029
Move list of config options to constant
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Not sure if this nit matters, so asking here before creating a new ticket +PR, but officially for PHP <8.1, the second param should be a string: https://www.php.net/manual/en/function.ini-set.php
https://phpstan.org/r/371b5bf7-6e70-45db-9d94-919d1ae49a5e
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.
Ah, thanks. Yeah, good point. Go ahead and open a PR.