From 749fbec962d6539607d265aa42899b066d23cbb7 Mon Sep 17 00:00:00 2001 From: Hill Date: Tue, 11 Dec 2018 16:33:53 +0000 Subject: [PATCH] fixed only set theme folder when value not empty --- src/ViewEngine.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ViewEngine.php b/src/ViewEngine.php index 17c3041..8966028 100644 --- a/src/ViewEngine.php +++ b/src/ViewEngine.php @@ -59,11 +59,13 @@ public function setThemePath($val) */ public function setThemeFolder($val) { - $this['themeFolder'] = p\realpath($val); - if (!$this['themeFolder']) { - throw new DomainException('Template folder was not found: ['.$val.']'); + if ($val) { + $this['themeFolder'] = p\realpath($val); + if (!$this['themeFolder']) { + throw new DomainException('Template folder was not found: ['.$val.']'); + } + $this->initTemplateHelper(); } - $this->initTemplateHelper(); } /**