diff --git a/Views/ViewAbstract.php b/Views/ViewAbstract.php index ce758048b..cf962f605 100644 --- a/Views/ViewAbstract.php +++ b/Views/ViewAbstract.php @@ -239,13 +239,14 @@ abstract class ViewAbstract implements \Serializable { $ob = ''; - try { + $path = __DIR__ . '/../..' . $this->template . '.tpl.php'; - if (!file_exists($path)) { - throw new PathException($path); - } + if (!file_exists($path)) { + throw new PathException($path); + } + try { ob_start(); /** @noinspection PhpIncludeInspection */ $data = include $path;