Fix invalid path exception

This commit is contained in:
Dennis Eichhorn 2017-09-06 15:06:11 +02:00
parent 34021f1cd5
commit 68328c8b5c

View File

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