make exception serializer a bit more robust
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
a7adc4cb3c
commit
99c00972a0
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue