1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-07-25 02:31:25 +02:00

Check log messages before interpolate (#477)

This commit is contained in:
Barry vd. Heuvel
2021-08-01 11:19:02 +02:00
committed by GitHub
parent 4ef8e359d9
commit 0a3532556b

View File

@@ -185,7 +185,11 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface
*/
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);
}
/**