mirror of
https://github.com/nextcloud/server.git
synced 2026-04-02 07:35:13 -04:00
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>
This commit is contained in:
parent
e056dd8ba9
commit
41cc0bb190
1 changed files with 3 additions and 3 deletions
|
|
@ -223,13 +223,13 @@ class ExceptionSerializer {
|
|||
}
|
||||
|
||||
private function encodeTrace($trace) {
|
||||
$filteredTrace = $this->filterTrace($trace);
|
||||
return array_map(function (array $line) {
|
||||
$trace = array_map(function (array $line) {
|
||||
if (isset($line['args'])) {
|
||||
$line['args'] = array_map([$this, 'encodeArg'], $line['args']);
|
||||
}
|
||||
return $line;
|
||||
}, $filteredTrace);
|
||||
}, $trace);
|
||||
return $this->filterTrace($trace);
|
||||
}
|
||||
|
||||
private function encodeArg($arg, $nestingLevel = 5) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue