From 72e55f9dbda68c3ac158118057b339a24fbfdf6e Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Fri, 24 Apr 2020 08:46:54 +0200 Subject: [PATCH] [ThemeBundle] fix for inheritance locator when no theme is set --- .../Bundle/ThemeBundle/Service/InheritanceLocator.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/CoreShop/Bundle/ThemeBundle/Service/InheritanceLocator.php b/src/CoreShop/Bundle/ThemeBundle/Service/InheritanceLocator.php index bc53375a0f..6d94389536 100644 --- a/src/CoreShop/Bundle/ThemeBundle/Service/InheritanceLocator.php +++ b/src/CoreShop/Bundle/ThemeBundle/Service/InheritanceLocator.php @@ -43,6 +43,10 @@ public function __construct( protected function getPathsForBundleResource($parameters) { + if (null === $this->lastTheme) { + return parent::getPathsForBundleResource($parameters); + } + $paths = array(); $hierarchy = $this->resolveHierarchy(); @@ -61,6 +65,10 @@ protected function getPathsForBundleResource($parameters) protected function getPathsForAppResource($parameters) { + if (null === $this->lastTheme) { + return parent::getPathsForAppResource($parameters); + } + $paths = array(); $hierarchy = $this->resolveHierarchy();