mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 08:37:30 +02:00
refactor: YoutubeBridge (#3755)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user