diff --git a/core/lib/Drupal/Core/Entity/EntityRepository.php b/core/lib/Drupal/Core/Entity/EntityRepository.php index 58381d1a2691abbabf3b1689ef09ce120bd51e6f..2d83a98a250e3661ba24c16b463af6597385f9dd 100644 --- a/core/lib/Drupal/Core/Entity/EntityRepository.php +++ b/core/lib/Drupal/Core/Entity/EntityRepository.php @@ -56,7 +56,7 @@ public function loadEntityByUuid($entity_type_id, $uuid) { $entities = $this->entityTypeManager->getStorage($entity_type_id)->loadByProperties([$uuid_key => $uuid]); - return reset($entities); + return ($entities) ? reset($entities) : NULL; } /**