Zend\Session\Container Session validation failed exception — Object(Closure) ZF2

前端 未结 1 1068
轻奢々
轻奢々 2020-12-21 02:02

I\'m trying to use authentication and sessions in a ZF2 App. So far I have the follow code:

In my Module.php:

// (...) rest of code

public function          


        
相关标签:
1条回答
  • 2020-12-21 02:53

    Attaching an event listener to listen to all events triggered by all classes $sharedEvents->attach('*', '*', .. ) will cause this error message.

    You have to be really careful what you attach listeners to, since some listeners are expecting a specific response (in this case a boolean indicating if session is valid). A listener that wasn't designed to handled the event, such as a log listener, will typically not return a response, which in this case is seen as a validation failure.

    0 讨论(0)
提交回复
热议问题