From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Wed, 8 May 2019 08:00:33 +0000 (+0200) Subject: fix class might be undefined X-Git-Tag: v15.0.8RC1~3^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eb8c2e98bdea0f57784233a96879bf41a7c249ef;p=nextcloud-server.git fix class might be undefined Co-Authored-By: blizzz Signed-off-by: Arthur Schiwon --- diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php index b9932cfa05c..8cfdb57b225 100644 --- a/lib/private/Log/ExceptionSerializer.php +++ b/lib/private/Log/ExceptionSerializer.php @@ -100,8 +100,8 @@ class ExceptionSerializer { private function filterTrace(array $trace) { $sensitiveValues = []; $trace = array_map(function (array $traceLine) use (&$sensitiveValues) { - $className = $traceLine['class']; - if (isset(self::methodsWithSensitiveParametersByClass[$className]) + $className = $traceLine['class'] ?? ''; + if ($className && isset(self::methodsWithSensitiveParametersByClass[$className]) && in_array($traceLine['function'], self::methodsWithSensitiveParametersByClass[$className], true)) { return $this->editTrace($sensitiveValues, $traceLine); }