1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-09-03 18:12:36 +02:00

Handle detail key of SoapFault being an object, fixes #1391

This commit is contained in:
Jordi Boggiano
2019-11-12 20:48:30 +01:00
parent cf77550dca
commit e1af546a55
2 changed files with 3 additions and 3 deletions

View File

@@ -142,8 +142,8 @@ class NormalizerFormatter implements FormatterInterface
$data['faultactor'] = $e->faultactor;
}
if (isset($e->detail)) {
$data['detail'] = $e->detail;
if (isset($e->detail) && (is_string($e->detail) || is_object($e->detail) || is_array($e->detail))) {
$data['detail'] = is_string($e->detail) ? $e->detail : reset($e->detail);
}
}