Replies: 4 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
|
NB I can resolve the issue in these projects by publishing message.blade.php to the project, and changing the first line to:
|
Beta Was this translation helpful? Give feedback.
-
|
The actual cause turns out to the change in Laravel 13 to a default of 'serialization' => 'json' in config/session.php, which means the result of retrieving the 'flash_notification' from the session is always an array, even when a collection was set originally. |
Beta Was this translation helpful? Give feedback.
-
|
Should be fixed now in the latest version. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Something has happened with these new versions which makes the session storage behave differently.
Using the package's own message.blade.php partial causes an error, because the value returned from session('flash_notification') is different.
Before:

After:

The error is "Call to a member function toArray() on array (View: /Users/jonnott/Projects/Fusion/git/laravel/vendor/laracasts/flash/src/views/message.blade.php)"
This is because it's now already an array.
I don't know if the change has happened in this package or Laravel itself, but the only change here seems to have been the laravel/framework dependency bump, and there's been no change to Illuminate/Collections/Traits/EnumeratesValues.php's toArray() method in Laravel between v12 and v13.
Any thoughts anyone?
Beta Was this translation helpful? Give feedback.
All reactions