mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-16 21:08:34 +01:00
Always cleanup args
This commit is contained in:
parent
6c17e0ea44
commit
bbbcd6335b
@ -97,19 +97,22 @@ class ExceptionsCollector extends DataCollector implements Renderable
|
|||||||
if (isset($track['file'])) {
|
if (isset($track['file'])) {
|
||||||
$track['file'] = $this->normalizeFilePath($track['file']);
|
$track['file'] = $this->normalizeFilePath($track['file']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($track['args'])) {
|
|
||||||
foreach ($track['args'] as $key => $arg) {
|
|
||||||
if (is_object($arg)) {
|
|
||||||
$track['args'][$key] = '[object ' . $this->getDataFormatter()->formatClassName($arg) . ']';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $track;
|
return $track;
|
||||||
}, $trace);
|
}, $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;
|
return $trace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user