From 2b28702a1892e69061d792f9ea2c191b242e416b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 27 May 2022 13:23:22 +0200 Subject: [PATCH] ensure that the $response property is initialized before being read --- src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php index b06f3244e73b8..d60b02a287558 100644 --- a/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php +++ b/src/Symfony/Bridge/Monolog/Handler/FirePHPHandler.php @@ -25,7 +25,7 @@ class FirePHPHandler extends BaseFirePHPHandler { private array $headers = []; - private Response $response; + private ?Response $response = null; /** * Adds the headers to the response once it's created. @@ -61,7 +61,7 @@ protected function sendHeader($header, $content): void return; } - if ($this->response) { + if (null !== $this->response) { $this->response->headers->set($header, $content); } else { $this->headers[$header] = $content; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy