diff options
author | Robin Appelman <robin@icewind.nl> | 2018-07-18 14:42:05 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-07-18 16:56:34 +0200 |
commit | 99c00972a026ca747013b42c466747d617cb0051 (patch) | |
tree | 411d6d665a8763769b7e2f08c5a43ed68902413d /lib/private/Log | |
parent | a7adc4cb3cdbf82b558665c87fd1ce1776268f2d (diff) | |
download | nextcloud-server-99c00972a026ca747013b42c466747d617cb0051.tar.gz nextcloud-server-99c00972a026ca747013b42c466747d617cb0051.zip |
make exception serializer a bit more robust
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/ExceptionSerializer.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index ecba043da44..768c6484963 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -82,7 +82,9 @@ class ExceptionSerializer { return $traceLine; }, $trace); return array_map(function (array $traceLine) use ($sensitiveValues) { - $traceLine['args'] = $this->removeValuesFromArgs($traceLine['args'], $sensitiveValues); + if (isset($traceLine['args'])) { + $traceLine['args'] = $this->removeValuesFromArgs($traceLine['args'], $sensitiveValues); + } return $traceLine; }, $trace); } @@ -101,7 +103,9 @@ class ExceptionSerializer { private function encodeTrace($trace) { $filteredTrace = $this->filterTrace($trace); return array_map(function (array $line) { - $line['args'] = array_map([$this, 'encodeArg'], $line['args']); + if (isset($line['args'])) { + $line['args'] = array_map([$this, 'encodeArg'], $line['args']); + } return $line; }, $filteredTrace); } @@ -138,4 +142,4 @@ class ExceptionSerializer { return $data; } -}
\ No newline at end of file +} |