Merge pull request #36167 from nextcloud/backport/35970/stable25

[stable25] Improve exception serializing
This commit is contained in:
Vincent Petry 2023-01-19 10:17:02 +01:00 committed by GitHub
commit bcbec0af90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {