From a79da346b6c20f65c397d586fe1e10f76b60c5d0 Mon Sep 17 00:00:00 2001 From: Joas Schilling <213943+nickvergessen@users.noreply.github.com> Date: Wed, 8 May 2019 10:00:33 +0200 Subject: [PATCH] fix class might be undefined Co-Authored-By: blizzz Signed-off-by: Arthur Schiwon --- lib/private/Log/ExceptionSerializer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.5