From 68328c8b5cc482846323fac1184cd76bf0181b96 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Wed, 6 Sep 2017 15:06:11 +0200 Subject: [PATCH] Fix invalid path exception --- Views/ViewAbstract.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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;