From a1d257f8da9f994f41cea28868db41231edee851 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Wed, 28 Jun 2017 15:20:11 +0200 Subject: [PATCH] Issue #2854046 by andypost: Only call getDerivativeId() when needed --- .../block_content/src/Plugin/Block/BlockContentBlock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php index e97e740187e..ef0bd96ea26 100644 --- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php +++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php @@ -178,8 +178,8 @@ class BlockContentBlock extends BlockBase implements ContainerFactoryPluginInter * The block content entity. */ protected function getEntity() { - $uuid = $this->getDerivativeId(); if (!isset($this->blockContent)) { + $uuid = $this->getDerivativeId(); $this->blockContent = $this->entityManager->loadEntityByUuid('block_content', $uuid); } return $this->blockContent;