Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.3.11 |
PHP version | 7.1.11 |
nginx version | 1.12.2 |
It's the first time that I reported a possible bug to Symfony and English isn't my mother tongue, so I want to apologize if I can't explain something clearly.
After upgrading to Symfony 3.3.11 failed all the battery of tests for my project. Among other failures, the most repeated is that the status code of the client wasn't 200 but 500, I then manually checked the project and whenever there is written this code:
if (!$flush) {
$status = 'POST_EDITED_PROPERLY';
} else {
$status = 'POST_EDITED_ERROR';
}
$this->session->getFlashBag()->add('status', $status);
It's true that there is a 500 error. And the Symfony error message is: Call to a member function isActive() on null.
The line of the log with the critical error is:
Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalThrowableError: "Call to a member function isActive() on null" at /Volumes/media/programación/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php line 290
The Stack Trace offered is:
Symfony\Component\Debug\Exception\FatalThrowableError:
Call to a member function isActive() on nullat vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php:290
at Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->getBag('flashes')
(vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:221)
at Symfony\Component\HttpFoundation\Session\Session->getBag('flashes')
(vendor/symfony/symfony/src/Symfony/Component/HttpFoundation/Session/Session.php:231)
at Symfony\Component\HttpFoundation\Session\Session->getFlashBag()
(src/AppBundle/Controller/AdminController.php:201)
at AppBundle\Controller\AdminController->postsEditAction(object(Request), '17')
at call_user_func_array(array(object(AdminController), 'postsEditAction'), array(object(Request), '17'))
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:153)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:169)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(web/app_dev.php:29)
at require('/Volumes/media/programación/www/Symfony/web/app_dev.php')
(vendor/symfony/symfony/src/Symfony/Bundle/WebServerBundle/Resources/router.php:42)
If I can do something more and it's within my ability just let me know.