Answer the question
In order to leave comments, you need to log in
How to eliminate a fatality with an invalid login in the SonataAdminBundle?
Set up SonataAdminBundle + FOS User Bundle.
Everything would be fine, but an annoying fatal error when entering the wrong username / password:
Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException:
"Error: Sonata\UserBundle\Controller\AdminSecurityController::loginAction(): The script tried to execute a method or access a property of an incomplete object.
Please ensure that the class definition "Symfony\Component\Security\Core\Exception\BadCredentialsException" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition " at /var/www/project/vendor/sonata-project/user-bundle/Controller/AdminSecurityController.php line 52 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalErrorException(code: 0): Error: Sonata\\UserBundle\\Controller\\AdminSecurityController::loginAction(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "Symfony\\Component\\ Security\\Core\\Exception\\BadCredentialsException"of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition at /var/www/project/vendor/sonata-project/user-bundle/Controller/AdminSecurityController .php:52)
Answer the question
In order to leave comments, you need to log in
I don't know how I got away. After another composer update, the error disappeared.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question