mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-01-29 03:07:42 +01:00
Avoid expanded values on MessagesCollector (#601)
This commit is contained in:
parent
689ecda8c1
commit
cbab4a8f45
@ -44,6 +44,22 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface
|
||||
$this->collectFile = $enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string|null $messageHtml
|
||||
* @param mixed $message
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
protected function customizeMessageHtml($messageHtml, $message)
|
||||
{
|
||||
$pos = strpos((string) $messageHtml, 'sf-dump-expanded');
|
||||
if ($pos !== false) {
|
||||
$messageHtml = substr_replace($messageHtml, 'sf-dump-compact', $pos, 16);
|
||||
}
|
||||
|
||||
return $messageHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a message
|
||||
*
|
||||
@ -81,7 +97,7 @@ class MessagesCollector extends AbstractLogger implements DataCollectorInterface
|
||||
|
||||
$this->messages[] = array(
|
||||
'message' => $messageText,
|
||||
'message_html' => $messageHtml,
|
||||
'message_html' => $this->customizeMessageHtml($messageHtml, $message),
|
||||
'is_string' => $isString,
|
||||
'label' => $label,
|
||||
'time' => microtime(true),
|
||||
|
Loading…
x
Reference in New Issue
Block a user