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
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.