mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03: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
1 changed files with 10 additions and 6 deletions
|
@ -41,12 +41,14 @@ class SQLiteCache implements CacheInterface
|
|||
$result = $stmt->execute();
|
||||
if ($result) {
|
||||
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
||||
$blob = $row['value'];
|
||||
$data = unserialize($blob);
|
||||
if ($data !== false) {
|
||||
return $data;
|
||||
if ($row !== false) {
|
||||
$blob = $row['value'];
|
||||
$data = unserialize($blob);
|
||||
if ($data !== false) {
|
||||
return $data;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -69,7 +71,9 @@ class SQLiteCache implements CacheInterface
|
|||
$result = $stmt->execute();
|
||||
if ($result) {
|
||||
$row = $result->fetchArray(\SQLITE3_ASSOC);
|
||||
return $row['updated'];
|
||||
if ($row !== false) {
|
||||
return $row['updated'];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue