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: v17.0.0beta1~457^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a79da346b6c20f65c397d586fe1e10f76b60c5d0;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); }