fix class might be undefined

Co-Authored-By: blizzz <blizzz@arthur-schiwon.de>

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Joas Schilling 2019-05-08 10:00:33 +02:00 committed by Backportbot
parent b70053be25
commit 8be9c9b0d9
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}