summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-01-03 19:24:00 +0100
committerJulius Härtl <jus@bitgrid.net>2023-01-18 16:34:52 +0100
commita2073f4d4dccf33c75d4127e3d13491a10a279c3 (patch)
treed05ce69b79192002bc7ccaa6b81a815c36713999 /lib/private
parentae03129e0691a50d4a9d33254121519d43ea1763 (diff)
downloadnextcloud-server-a2073f4d4dccf33c75d4127e3d13491a10a279c3.tar.gz
nextcloud-server-a2073f4d4dccf33c75d4127e3d13491a10a279c3.zip
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>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Log/ExceptionSerializer.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 0758e48197a..975b517249e 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -228,13 +228,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) {