Skip to content

Commit ed0ed80

Browse files
[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix symfony#10292
1 parent 37a4876 commit ed0ed80

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ function ($row) {
126126
require __DIR__.'/Exception/ContextErrorException.php';
127127
}
128128

129+
if (PHP_VERSION_ID < 50400 && isset($context['GLOBALS'])) {
130+
unset($context['GLOBALS']);
131+
}
132+
129133
$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);
130134

131135
// Exceptions thrown from error handlers are sometimes not caught by the exception

0 commit comments

Comments
 (0)