diff options
Diffstat (limited to 'core/Log.php')
-rw-r--r-- | core/Log.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Log.php b/core/Log.php index 260e57fea6..82f2beab66 100644 --- a/core/Log.php +++ b/core/Log.php @@ -209,8 +209,12 @@ class Log extends Singleton $parameters['exception'] = $message; $message = $message->getMessage(); } + if (! is_string($message)) { - throw new \InvalidArgumentException('Trying to log a message that is not a string'); + $this->logger->warning('Trying to log a message that is not a string', array( + 'exception' => new \InvalidArgumentException + )); + return; } $this->logger->log($level, $message, $parameters); |