Skip to content
Snippets Groups Projects

Fixed empty array for query result causing entity storage to crash loading a FALSE entity ID.

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -178,7 +178,7 @@ class EntityUsageBatchManager implements ContainerInjectionInterface {
->execute();
$entity_id = reset($entity_ids);
if (isset($entity_id) && $entity = $entity_storage->load($entity_id)) {
if (!empty($entity_id) && $entity = $entity_storage->load($entity_id)) {
/** @var \Drupal\Core\Entity\EntityInterface $entity */
try {
if ($entity->getEntityType()->isRevisionable()) {
Loading