mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-17 13:28:35 +01:00
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)
This commit is contained in:
parent
0e50bf1950
commit
8241f4015a
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user