1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-05 12:47:39 +02:00

Also fix SoapFault handling in LineFormatter, refs #1391

This commit is contained in:
Jordi Boggiano
2019-12-07 16:37:53 +01:00
parent 798cbf9881
commit 633bcd5268

View File

@@ -180,8 +180,8 @@ class LineFormatter extends NormalizerFormatter
$str .= ' faultactor: ' . $e->faultactor;
}
if (isset($e->detail)) {
$str .= ' detail: ' . $e->detail;
if (isset($e->detail) && (is_string($e->detail) || is_object($e->detail) || is_array($e->detail))) {
$str .= ' detail: ' . (is_string($e->detail) ? $e->detail : reset($e->detail));
}
}
$str .= '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')';