diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php index c6cdcf2..85e6164 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php @@ -109,10 +109,12 @@ public static function preDelete(EntityStorageInterface $storage, array $entitie * {@inheritdoc} */ public static function postDelete(EntityStorageInterface $storage, array $entities) { - foreach ($entities as $entity) { - $event = new GenericEvent('aggregator_feed_block', array('conditions' => array('settings.feed' => $entity->id()))); - \Drupal::service('event_dispatcher') - ->dispatch(BlockPluginEvents::PERMANENTLY_UNAVAILABLE, $event); + if (\Drupal::moduleHandler()->moduleExists('block')) { + foreach ($entities as $entity) { + $event = new GenericEvent('aggregator_feed_block', array('conditions' => array('settings.feed' => $entity->id()))); + \Drupal::service('event_dispatcher') + ->dispatch(BlockPluginEvents::PERMANENTLY_UNAVAILABLE, $event); + } } } diff --git a/core/modules/block/lib/Drupal/block/BlockEntityBlockEventSubscriber.php b/core/modules/block/lib/Drupal/block/BlockEntityBlockEventSubscriber.php index 92067e9..7d997de 100644 --- a/core/modules/block/lib/Drupal/block/BlockEntityBlockEventSubscriber.php +++ b/core/modules/block/lib/Drupal/block/BlockEntityBlockEventSubscriber.php @@ -29,7 +29,7 @@ class BlockEntityBlockEventSubscriber implements EventSubscriberInterface { /** * The block storage controller. * - * @var \Drupal\Core\Entity\EntityStorageControllerInterface + * @var \Drupal\Core\Entity\EntityStorageInterface */ protected $blockStorageController; @@ -43,7 +43,7 @@ class BlockEntityBlockEventSubscriber implements EventSubscriberInterface { */ public function __construct(QueryFactory $query_factory, EntityManagerInterface $entity_manager) { $this->queryFactory = $query_factory; - $this->blockStorageController = $entity_manager->getStorageController('block'); + $this->blockStorageController = $entity_manager->getStorage('block'); } /**