rawilk / laravel-settings

Store Laravel application settings in the database.
https://randallwilk.dev/docs/laravel-settings
MIT License
197 stars 17 forks source link

unserialize(): Error at offset 0 of 4 bytes #61

Closed stojankukrika closed 8 months ago

stojankukrika commented 8 months ago

Laravel Settings

3.3.1

Laravel Version

11.0

Bug description

I have this line in code: $settings = settings()->all(); and get this information in bugsnag.

Steps to reproduce

I use a teams 'teams' = true, and 'team_foreign_key' => 'current_team_id' and use this custom middleware : https://randallwilk.dev/docs/laravel-settings/v3/advanced-usage/custom-generators and disabled encryption and cache.

Relevant log output

unserialize(): Error at offset 0 of 4 bytes and point this `$settings = settings()->all();` line in code
stojankukrika commented 8 months ago

fixed with custom Serializer