-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Closed
Labels
Description
Laravel Version
11.37.0
PHP Version
8.4.2
Database Driver & Version
Sqlite3 3.43.2 2023-10-10 13:08:14
Description
PHP serialize includes a null character when serializing objects with private properties (Source: PHP.net / Serialize), which SQLite3 doesn't properly support - getting cached values with Laravel somehow works, but the cli command sqlite3
, many db browsers and even the .dump
command fail to properly output the value from the cache KV store (Source: SQLite3 - Nul characters in strings).
When debugging the error with the unserialisation of the value, I've noticed the Cache class already guards against nul values in Postgresql connections in
if ($this->connection instanceof PostgresConnection && str_contains($result, "\0")) { |
Steps To Reproduce
- create new laravel app
- set cache_store to database
- cache any object with private properties (I'm caching Collection)
- observe the database through cli command, db browser, or try to
.dump
the sqlite file
nyosru and ijeffro