summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-03-21 01:16:05 (GMT)
committerNathaniel Catchpole2016-03-21 01:16:05 (GMT)
commit6de23686f13d7a3e3a3af8ed3c9184938df9320e (patch)
tree6835e245100e385b4cb27e5aef77c1586dbc3117
parent7a4396a4f399047f45372f2e379c05c30918ebac (diff)
Issue #2625138 by almaudoh, Oleksiy: EntityRepository::loadEntityByUuid() implementation does not match EntityRepositoryInterface::loadEntityByUuid() @return documentation
-rw-r--r--core/lib/Drupal/Core/Entity/EntityRepository.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/lib/Drupal/Core/Entity/EntityRepository.php b/core/lib/Drupal/Core/Entity/EntityRepository.php
index 58381d1..2d83a98 100644
--- a/core/lib/Drupal/Core/Entity/EntityRepository.php
+++ b/core/lib/Drupal/Core/Entity/EntityRepository.php
@@ -56,7 +56,7 @@ class EntityRepository implements EntityRepositoryInterface {
$entities = $this->entityTypeManager->getStorage($entity_type_id)->loadByProperties([$uuid_key => $uuid]);
- return reset($entities);
+ return ($entities) ? reset($entities) : NULL;
}
/**