$this->flashmessenger()->getMessages() got error : "Container cannot write to storage due to type mismatch" for 2.1.1 #3700
Comments
I am looking into this; not quite certain why it is happening yet; but diagnosing it none the less. |
I believe that this was due to a session that was previously created; all new sessions should not show this issue. This is because the contract for session containers used to require an array or an instanceof an ArrayObject; now it is an array or an instance of a Zend\Stdlib\ArrayObject. I believe that we can make a change to allow anything that is Traversable that does not have any harmful side effects. |
@weierophinney please let me know if this is something we should do... might cause people already with production apps to have to reset all of their sessions 👎 |
Oops, there is my old session, issue closed. sorry ;) |
It would actually be good to keep this issue open as it is more or less an upgrade bug. |
Hello there, I'm struggling with the same issue - after updating to 2.1.1 my application stopped working. How do I approach this without editing the ZF's code? Should I start retrieving my flash messages in a different way? |
@pawelnowak without editing ZF's code; remove all php sessions and force them to recreate a session. There is a fix in progress; I have a working branch but it has to execute it's unit tests as well as be reviewed. |
@mwillbanks ok, i re-open it |
@mwillbanks, your solution worked, thanks. |
When I use $this->flashmessenger()->getMessages() for 2.1.1 there is error :
in
It just work for 2.1.0
The text was updated successfully, but these errors were encountered: