Skip to content

Commit 8241f40

Browse files
committed
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)
1 parent 0e50bf1 commit 8241f40

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/DebugBar/DataCollector/MessagesCollector.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ public function getDataFormatter()
6060
* @param mixed $message
6161
* @param string $label
6262
*/
63-
public function addMessage($message, $label = 'info')
63+
public function addMessage($message, $label = 'info', $isString = true)
6464
{
65-
$isString = true;
6665
if (!is_string($message)) {
6766
$message = $this->getDataFormatter()->formatVar($message);
6867
$isString = false;

0 commit comments

Comments
 (0)