mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-26 03:01:23 +02:00
Check log messages before interpolate
This commit is contained in:
@@ -185,7 +185,11 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface
|
|||||||
*/
|
*/
|
||||||
public function log($level, $message, array $context = array())
|
public function log($level, $message, array $context = array())
|
||||||
{
|
{
|
||||||
$this->addMessage($this->interpolate($message, $context), $level);
|
// For string messages, interpolate the context following PSR-3
|
||||||
|
if (is_string($message)) {
|
||||||
|
$message = $this->interpolate($message, $context);
|
||||||
|
}
|
||||||
|
$this->addMessage($message, $level);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user