mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 13:00:42 +01:00
Remove trace args in Exceptions (#691)
* Remove trace args in Exceptions * Always cleanup args
This commit is contained in:
parent
689720d724
commit
687400043d
@ -97,11 +97,22 @@ class ExceptionsCollector extends DataCollector implements Renderable
|
||||
if (isset($track['file'])) {
|
||||
$track['file'] = $this->normalizeFilePath($track['file']);
|
||||
}
|
||||
|
||||
return $track;
|
||||
}, $trace);
|
||||
}
|
||||
|
||||
// Remove large objects from the trace
|
||||
$trace = array_map(function ($track) {
|
||||
if (isset($track['args'])) {
|
||||
foreach ($track['args'] as $key => $arg) {
|
||||
if (is_object($arg)) {
|
||||
$track['args'][$key] = '[object ' . $this->getDataFormatter()->formatClassName($arg) . ']';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $track;
|
||||
}, $trace);
|
||||
|
||||
return $trace;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user