Ignore headers already sent errors

This commit is contained in:
Daniil Gentili 2018-12-27 23:17:47 +00:00
parent 422589ac2b
commit 87fdbda399

View File

@ -84,7 +84,7 @@ class Exception extends \Exception
public static function ExceptionErrorHandler($errno = 0, $errstr = null, $errfile = null, $errline = null)
{
// If error is suppressed with @, don't throw an exception
if (error_reporting() === 0 || $errfile && strpos($errfile, 'vendor/amphp') !== false) {
if (error_reporting() === 0 || strpos($errstr, 'headers already sent') || ($errfile && strpos($errfile, 'vendor/amphp') !== false)) {
return false;
}