diff --git a/Log.php b/Log.php index f37c649..d4b9239 100755 --- a/Log.php +++ b/Log.php @@ -397,7 +397,7 @@ protected function extractMessage($message): string */ if (is_object($message)) { if (method_exists($message, 'getmessage')) { - $message = $message->getMessage(); + $message = (string)$message->getMessage(); } else if (method_exists($message, 'tostring')) { $message = $message->toString(); } else if (method_exists($message, '__tostring')) { @@ -408,7 +408,7 @@ protected function extractMessage($message): string } else if (is_array($message)) { if (isset($message['message'])) { if (is_scalar($message['message'])) { - $message = $message['message']; + $message = (string)$message['message']; } else { $message = var_export($message['message'], true); }