mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-03 09:35:57 +02:00
refactor: YoutubeBridge (#3755)
This commit is contained in:
parent
daef240cd2
commit
cf9558648e
2 changed files with 180 additions and 204 deletions
|
@ -30,7 +30,8 @@ class FileCache implements CacheInterface
|
|||
if (!file_exists($cacheFile)) {
|
||||
return $default;
|
||||
}
|
||||
$item = unserialize(file_get_contents($cacheFile));
|
||||
$data = file_get_contents($cacheFile);
|
||||
$item = unserialize($data);
|
||||
if ($item === false) {
|
||||
$this->logger->warning(sprintf('Failed to unserialize: %s', $cacheFile));
|
||||
$this->delete($key);
|
||||
|
@ -87,7 +88,8 @@ class FileCache implements CacheInterface
|
|||
if (isset($excluded[$filename]) || !is_file($cacheFile)) {
|
||||
continue;
|
||||
}
|
||||
$item = unserialize(file_get_contents($cacheFile));
|
||||
$data = file_get_contents($cacheFile);
|
||||
$item = unserialize($data);
|
||||
if ($item === false) {
|
||||
unlink($cacheFile);
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue