Skip to content

Commit

Permalink
[MonologBridge] Improve FirePHPHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Jul 17, 2018
1 parent efc4fb3 commit 1d93b5e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php
Expand Up @@ -38,9 +38,10 @@ public function onKernelResponse(FilterResponseEvent $event)
return;
}

if (!preg_match('{\bFirePHP/\d+\.\d+\b}', $event->getRequest()->headers->get('User-Agent'))
&& !$event->getRequest()->headers->has('X-FirePHP-Version')) {
$this->sendHeaders = false;
$request = $event->getRequest();
if (!preg_match('{\bFirePHP/\d+\.\d+\b}', $request->headers->get('User-Agent'))
&& !$request->headers->has('X-FirePHP-Version')) {
self::$sendHeaders = false;
$this->headers = array();

return;
Expand All @@ -58,7 +59,7 @@ public function onKernelResponse(FilterResponseEvent $event)
*/
protected function sendHeader($header, $content)
{
if (!$this->sendHeaders) {
if (!self::$sendHeaders) {
return;
}

Expand Down

0 comments on commit 1d93b5e

Please sign in to comment.