1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Merge remote-tracking branch 'neclimdul/SoapFaultObjectFailure'

This commit is contained in:
Jordi Boggiano
2020-05-21 17:01:29 +02:00
3 changed files with 26 additions and 9 deletions

View File

@@ -180,8 +180,12 @@ class LineFormatter extends NormalizerFormatter
$str .= ' faultactor: ' . $e->faultactor;
}
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));
if (isset($e->detail)) {
if (is_string($e->detail)) {
$str .= ' detail: ' . $e->detail;
} elseif (is_object($e->detail) || is_array($e->detail)) {
$str .= ' detail: ' . $this->toJson($e->detail, true);
}
}
}
$str .= '): ' . $e->getMessage() . ' at ' . $e->getFile() . ':' . $e->getLine() . ')';