Skip to content

Commit

Permalink
fixed only set theme folder when value not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
HillLiu committed Dec 11, 2018
1 parent 6b48eb7 commit 749fbec
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ViewEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit 749fbec

Please sign in to comment.