Skip to content

Commit 48f26f7

Browse files
committed
bug symfony#10801 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix symfony#10292 (nicolas-grekas)
This PR was merged into the 2.3 branch. Discussion ---------- [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix symfony#10292 | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#10292 | License | MIT | Doc PR | none Commits ------- ed0ed80 [Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix symfony#10292
2 parents 9e2a834 + ed0ed80 commit 48f26f7

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)