Skip to content

Commit 250bb26

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 f74ba9c commit 250bb26

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/private/Log/ExceptionSerializer.php

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

225225
private function encodeTrace($trace) {
226-
$filteredTrace = $this->filterTrace($trace);
227-
return array_map(function (array $line) {
226+
$trace = array_map(function (array $line) {
228227
if (isset($line['args'])) {
229228
$line['args'] = array_map([$this, 'encodeArg'], $line['args']);
230229
}
231230
return $line;
232-
}, $filteredTrace);
231+
}, $trace);
232+
return $this->filterTrace($trace);
233233
}
234234

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

0 commit comments

Comments
 (0)