core/lib/Drupal/Core/Entity/ContentEntityBase.php | 2 +- core/lib/Drupal/Core/Entity/Entity.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index e057560..d09c412 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -175,7 +175,7 @@ public function __construct(array $values, $entity_type, $bundle = FALSE, $trans */ protected function typedDataManager() { if (!$this->typedDataManager) { - return \Drupal::typedDataManager(); + $this->typedDataManager = \Drupal::typedDataManager(); } return $this->typedDataManager; diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 913a316..824ab53 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -89,7 +89,7 @@ public function __construct(array $values, $entity_type) { */ protected function entityManager() { if (!$this->entityManager) { - return \Drupal::entityManager(); + $this->entityManager = \Drupal::entityManager(); } return $this->entityManager; @@ -102,7 +102,7 @@ protected function entityManager() { */ protected function languageManager() { if (!$this->languageManager) { - return \Drupal::languageManager(); + $this->languageManager = \Drupal::languageManager(); } return $this->languageManager;