Skip to content

Commit

Permalink
[Debug] remove $GLOBALS from the trace displayed by ExceptionHandler, f…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Apr 28, 2014
1 parent d7a186f commit e8cb0b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Symfony/Component/Debug/ExceptionHandler.php
Expand Up @@ -154,6 +154,15 @@ public function getContent(FlattenException $exception)
EOF
, $ind, $total, $class, $message);

if (PHP_VERSION_ID < 50400 && isset($e['trace'][1])) {
$trace = $e['trace'][1];
if (isset($trace['class'], $trace['function']) && 'Symfony\Component\Debug\ErrorHandler::handle' === $trace['class'].'::'.$trace['function']) {
$trace = null;
unset($e['trace'][1]['args'][4][1]['GLOBALS']);
}
}

foreach ($e['trace'] as $trace) {
$content .= ' <li>';
if ($trace['function']) {
Expand Down

0 comments on commit e8cb0b8

Please sign in to comment.