You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To me this is counter-intuitive. If there are no "success" messages, I would expect getMessages('success') to return NULL or FALSE or at least an empty array. Otherwise there is no way to test if success/warning/etc messages exist.
The text was updated successfully, but these errors were encountered:
I'm calling this a bug, but really it's just undocumented behaviour that I think should be changed.
Anyway, \Phalcon\Flash\Session::getMessage() returns an array of all flashed messages, when no messages of a requested type exist.
For example:
Will output:
To me this is counter-intuitive. If there are no "success" messages, I would expect
getMessages('success')
to return NULL or FALSE or at least an empty array. Otherwise there is no way to test if success/warning/etc messages exist.The text was updated successfully, but these errors were encountered: