From 8241f4015a61c782a571ed73f09d6571ea683090 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sun, 23 Mar 2014 21:27:44 +0100 Subject: [PATCH] Make isString configurable The current `is_string` is really if it is a string, but rather that it should or shouldn't be prettified. With this tweak we can force the prettify behaviour (for example, multi-line logs or json_encode data is much more readable when prettified) --- src/DebugBar/DataCollector/MessagesCollector.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/DebugBar/DataCollector/MessagesCollector.php b/src/DebugBar/DataCollector/MessagesCollector.php index 69097ec..249b5cc 100644 --- a/src/DebugBar/DataCollector/MessagesCollector.php +++ b/src/DebugBar/DataCollector/MessagesCollector.php @@ -60,9 +60,8 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface * @param mixed $message * @param string $label */ - public function addMessage($message, $label = 'info') + public function addMessage($message, $label = 'info', $isString = true) { - $isString = true; if (!is_string($message)) { $message = $this->getDataFormatter()->formatVar($message); $isString = false;