Skip to content

Commit

Permalink
[Debug] ErrorHandler: remove $GLOBALS from context in PHP5.3 fix #10292
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 28, 2014
1 parent 37a4876 commit ed0ed80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Symfony/Component/Debug/ErrorHandler.php
Expand Up @@ -126,6 +126,10 @@ function ($row) {
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);

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

0 comments on commit ed0ed80

Please sign in to comment.