[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292
This commit is contained in:
parent
37a4876d8b
commit
ed0ed80286
@ -126,6 +126,10 @@ class ErrorHandler
|
|||||||
require __DIR__.'/Exception/ContextErrorException.php';
|
require __DIR__.'/Exception/ContextErrorException.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS'])) {
|
||||||
|
unset($context['GLOBALS']);
|
||||||
|
}
|
||||||
|
|
||||||
$exception = new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context);
|
$exception = new ContextErrorException(sprintf('%s: %s in %s line %d', isset($this->levels[$level]) ? $this->levels[$level] : $level, $message, $file, $line), 0, $level, $file, $line, $context);
|
||||||
|
|
||||||
// Exceptions thrown from error handlers are sometimes not caught by the exception
|
// Exceptions thrown from error handlers are sometimes not caught by the exception
|
||||||
|
Reference in New Issue
Block a user