Skip to content

Commit 1e6b2eb

Browse files
fix(ExceptionSerializer): encode arguments before filtering the trace
This will avoid running into a Nesting level too deep error as the encodeArg calls will limit potential recursive calls on the arguments to a nesting level of 5 Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 6c1cbda commit 1e6b2eb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/private/Log/ExceptionSerializer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,13 @@ private function removeValuesFromArgs($args, $values) {
228228
}
229229

230230
private function encodeTrace($trace) {
231-
$filteredTrace = $this->filterTrace($trace);
232-
return array_map(function (array $line) {
231+
$trace = array_map(function (array $line) {
233232
if (isset($line['args'])) {
234233
$line['args'] = array_map([$this, 'encodeArg'], $line['args']);
235234
}
236235
return $line;
237-
}, $filteredTrace);
236+
}, $trace);
237+
return $this->filterTrace($trace);
238238
}
239239

240240
private function encodeArg($arg, $nestingLevel = 5) {

0 commit comments

Comments
 (0)