fix(sqlitecache): log failed unserialization (#3539)

This commit is contained in:
Dag 2023-07-15 22:44:26 +02:00 committed by GitHub
parent ef8181478d
commit e8420b9f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -41,10 +41,12 @@ class SQLiteCache implements CacheInterface
$result = $stmt->execute();
if ($result) {
$row = $result->fetchArray(\SQLITE3_ASSOC);
$data = unserialize($row['value']);
$blob = $row['value'];
$data = unserialize($blob);
if ($data !== false) {
return $data;
}
Logger::error(sprintf("Failed to unserialize: '%s'", mb_substr($blob, 0, 100)));
}
return null;
}