Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / aggregator / src / Plugin / Block / AggregatorFeedBlock.php
index 90d8f669dda51d056b910da75b16d4cd0260009b..f4c8e2a57d18c526fc44a7e15a68863f94e6fd18 100644 (file)
@@ -167,8 +167,10 @@ class AggregatorFeedBlock extends BlockBase implements ContainerFactoryPluginInt
    */
   public function getCacheTags() {
     $cache_tags = parent::getCacheTags();
-    $feed = $this->feedStorage->load($this->configuration['feed']);
-    return Cache::mergeTags($cache_tags, $feed->getCacheTags());
+    if ($feed = $this->feedStorage->load($this->configuration['feed'])) {
+      $cache_tags = Cache::mergeTags($cache_tags, $feed->getCacheTags());
+    }
+    return $cache_tags;
   }
 
 }