1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-07-30 21:30:14 +02:00

fix: php errors (notices) (#3115)

This commit is contained in:
Dag
2022-10-26 00:47:45 +02:00
committed by GitHub
parent 8795cb252f
commit 52af2ae34c
9 changed files with 33 additions and 20 deletions

View File

@@ -60,6 +60,7 @@ class FileCache implements CacheInterface
continue;
} elseif ($cacheFile->isFile()) {
if (filemtime($cacheFile->getPathname()) < time() - $seconds) {
// todo: sometimes this file doesn't exists
unlink($cacheFile->getPathname());
}
}
@@ -68,7 +69,7 @@ class FileCache implements CacheInterface
public function setScope($scope)
{
if (is_null($scope) || !is_string($scope)) {
if (!is_string($scope)) {
throw new \Exception('The given scope is invalid!');
}