We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Cleaning output buffers (preferably in a loop as buffers can be nested) in ErrorHandler->discardBuffer() solves the problem.
The following code recreates the problem:
<?php ini_set("display_errors", 1); ini_set("display_startup_errors", 1); error_reporting(-1); require_once('../library/php_error.php'); \php_error\reportErrors(); ob_start(); echo "before"; trigger_error("ERROR", E_USER_NOTICE); echo "after"; ob_flush();
The text was updated successfully, but these errors were encountered:
adding
while(ob_end_clean());
at the beginning of discardBuffer() fixes it...
Sorry, something went wrong.
This will avoid an error if you're not currently in a buffer:
while (ob_get_level() > 0) ob_end_clean();
Fixed in PR: #94
No branches or pull requests
Cleaning output buffers (preferably in a loop as buffers can be nested) in ErrorHandler->discardBuffer() solves the problem.
The following code recreates the problem:
The text was updated successfully, but these errors were encountered: