summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--providers/Youtube.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/providers/Youtube.php b/providers/Youtube.php
index 9989bdd..b84ef77 100644
--- a/providers/Youtube.php
+++ b/providers/Youtube.php
@@ -31,7 +31,11 @@ class Youtube extends Rss {
if (file_exists($cacheFile)) {
$cacheData = unserialize(file_get_contents($cacheFile));
}
- $oldIDs = array_keys($cacheData);
+ if ($cacheData) {
+ $oldIDs = array_keys($cacheData);
+ } else {
+ $oldIDs = [];
+ }
$newIDs = array_diff($ids, $oldIDs);
if ($newIDs) {
$metadata = $this->_youtube->getVideosInfo($newIDs);