Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6.0.0
I'm in the process of upgrading to Symfony v6. When I want to access any page (from Chrome), I get this:
[2021-12-08T20:01:26.600149+00:00] php.CRITICAL: Uncaught Error: Typed property Symfony\Bridge\Monolog\Handler\ChromePhpHandler::$response must not be accessed before initialization {"exception":"[object] (Error(code: 0): Typed property Symfony\\Bridge\\Monolog\\Handler\\ChromePhpHandler::$response must not be accessed before initialization at $ROOTDIR/vendor/symfony/monolog-bridge/Handler/ChromePhpHandler.php:62) [stacktrace] #0 $ROOTDIR/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php(168): Symfony\\Bridge\\Monolog\\Handler\\ChromePhpHandler->sendHeader() #1 $ROOTDIR/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php(123): Monolog\\Handler\\ChromePHPHandler->send() #2 $ROOTDIR/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(42): Monolog\\Handler\\ChromePHPHandler->write() #3 $ROOTDIR/vendor/monolog/monolog/src/Monolog/Logger.php(317): Monolog\\Handler\\AbstractProcessingHandler->handle() #4 $ROOTDIR/vendor/monolog/monolog/src/Monolog/Logger.php(552): Monolog\\Logger->addRecord() #5 $ROOTDIR/vendor/symfony/http-kernel/EventListener/ErrorListener.php(151): Monolog\\Logger->critical() #6 $ROOTDIR/vendor/symfony/http-kernel/EventListener/ErrorListener.php(58): Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener->logException() #7 $ROOTDIR/vendor/symfony/event-dispatcher/EventDispatcher.php(270): Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener->logKernelException() #8 $ROOTDIR/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\\Component\\EventDispatcher\\EventDispatcher::Symfony\\Component\\EventDispatcher\\{closure}() #9 $ROOTDIR/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\\Component\\EventDispatcher\\EventDispatcher->callListeners() #10 $ROOTDIR/vendor/symfony/http-kernel/HttpKernel.php(213): Symfony\\Component\\EventDispatcher\\EventDispatcher->dispatch() #11 $ROOTDIR/vendor/symfony/http-kernel/HttpKernel.php(106): Symfony\\Component\\HttpKernel\\HttpKernel->handleThrowable() #12 $ROOTDIR/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php(125): Symfony\\Component\\HttpKernel\\HttpKernel->terminateWithException() #13 $ROOTDIR/vendor/symfony/error-handler/ErrorHandler.php(541): Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::Symfony\\Component\\HttpKernel\\EventListener\\{closure}() #14 [internal function]: Symfony\\Component\\ErrorHandler\\ErrorHandler->handleException() #15 {main} "} []
Surely this is caused by some underlying error, but I can't see that one because the ChromePhpHandler fails.
Can't say, presumably just run any app with the latest version, including ErrorHandler and ChromePhpHandler?
monolog: handlers: main: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug channels: ["!event"] chromephp: type: chromephp level: info ...
sendHeader() is called already when the RouteListener wants to log its "Matched route ..." information. But I guess that's normal.
sendHeader()
RouteListener
It's probably caused by 39fb557. Typed properties don't coerce to false in an if statement, so this line now needs updating.
false
if
@derrabus
No response
The text was updated successfully, but these errors were encountered:
Would you mind sending a PR changing that statement to if ($this->response ?? false) { on the 6.0 branch?
if ($this->response ?? false) {
Sorry, something went wrong.
Don't read uninitialized typed property ChromePhpHandler::$response
00746e1
Fixes symfony#44513
Don't access uninitialized typed property ChromePhpHandler::$response
da457d9
Is that better than isset()?
isset()
bug #44514 Don't access uninitialized typed property ChromePhpHandler…
e4cfa82
…::$response (Philipp91) This PR was merged into the 6.0 branch. Discussion ---------- Don't access uninitialized typed property ChromePhpHandler::$response Fixes #44513 | Q | A | ------------- | --- | Branch? | 6.0 | Bug fix? | yes | Tickets | Fix #44513 | License | MIT Commits ------- da457d9 Don't access uninitialized typed property ChromePhpHandler::$response
No branches or pull requests
Symfony version(s) affected
6.0.0
Description
I'm in the process of upgrading to Symfony v6. When I want to access any page (from Chrome), I get this:
Surely this is caused by some underlying error, but I can't see that one because the ChromePhpHandler fails.
How to reproduce
Can't say, presumably just run any app with the latest version, including ErrorHandler and ChromePhpHandler?
sendHeader()
is called already when theRouteListener
wants to log its "Matched route ..." information. But I guess that's normal.Possible Solution
It's probably caused by 39fb557. Typed properties don't coerce to
false
in anif
statement, so this line now needs updating.@derrabus
Additional Context
No response
The text was updated successfully, but these errors were encountered: