mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-10 08:58:50 +00:00
fix(sqlitecache): bug in prior refactor (#3540)
fixes: rssbridge.WARNING Trying to access array offset on value of type bool at caches/SQLiteCache.php line 72
This commit is contained in:
parent
e8420b9f39
commit
773eea196f
@ -41,6 +41,7 @@ class SQLiteCache implements CacheInterface
|
|||||||
$result = $stmt->execute();
|
$result = $stmt->execute();
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
||||||
|
if ($row !== false) {
|
||||||
$blob = $row['value'];
|
$blob = $row['value'];
|
||||||
$data = unserialize($blob);
|
$data = unserialize($blob);
|
||||||
if ($data !== false) {
|
if ($data !== false) {
|
||||||
@ -48,6 +49,7 @@ class SQLiteCache implements CacheInterface
|
|||||||
}
|
}
|
||||||
Logger::error(sprintf("Failed to unserialize: '%s'", mb_substr($blob, 0, 100)));
|
Logger::error(sprintf("Failed to unserialize: '%s'", mb_substr($blob, 0, 100)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,8 +71,10 @@ class SQLiteCache implements CacheInterface
|
|||||||
$result = $stmt->execute();
|
$result = $stmt->execute();
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
||||||
|
if ($row !== false) {
|
||||||
return $row['updated'];
|
return $row['updated'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user