mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-21 16:46:11 +02:00
Merge pull request #674 from xapon/tostring-error
#673 Fix fatal error while normalizing with __toString method
This commit is contained in:
@@ -96,7 +96,7 @@ class NormalizerFormatter implements FormatterInterface
|
||||
|
||||
// non-serializable objects that implement __toString stringified
|
||||
if (method_exists($data, '__toString') && !$data instanceof \JsonSerializable) {
|
||||
$value = (string) $data;
|
||||
$value = $data->__toString();
|
||||
} else {
|
||||
// the rest is json-serialized in some way
|
||||
$value = $this->toJson($data, true);
|
||||
|
Reference in New Issue
Block a user