1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-02 22:57:26 +02:00

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

View File

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