mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-24 18:16:10 +02:00
Merge branch '2.x'
This commit is contained in:
@@ -206,6 +206,9 @@ class NormalizerFormatter implements FormatterInterface
|
||||
if ($data instanceof \JsonSerializable) {
|
||||
/** @var null|scalar|array<mixed[]|scalar|null> $value */
|
||||
$value = $data->jsonSerialize();
|
||||
} elseif (\get_class($data) === '__PHP_Incomplete_Class') {
|
||||
$accessor = new \ArrayObject($data);
|
||||
$value = (string) $accessor['__PHP_Incomplete_Class_Name'];
|
||||
} elseif (method_exists($data, '__toString')) {
|
||||
/** @var string $value */
|
||||
$value = $data->__toString();
|
||||
|
||||
Reference in New Issue
Block a user