aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Log
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-16 09:47:31 +0100
commit7daa20d3095cbf99abebfe23fb307fff9d1e5fbb (patch)
tree5877b9fd140c929c768cb35ee25f4a0da7502d77 /lib/private/Log
parent00b7575c89815aa218e7e3ed3d61b25ee65f244f (diff)
downloadnextcloud-server-7daa20d3095cbf99abebfe23fb307fff9d1e5fbb.tar.gz
nextcloud-server-7daa20d3095cbf99abebfe23fb307fff9d1e5fbb.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/Log')
-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 aaf6a39235e..5f806be0ae5 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -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) {