From 73f9f30e9fcc9db0e1db292617ae1cd056907f18 Mon Sep 17 00:00:00 2001 From: Sam Hermans Date: Thu, 28 Jul 2016 11:18:24 +0300 Subject: [PATCH] realpath returns the canonicalized absolute pathname --- libs/DauxHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/DauxHelper.php b/libs/DauxHelper.php index ce2508a..51b1dad 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -29,7 +29,7 @@ class DauxHelper return; } - if (is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { + if (is_dir(realpath(($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])))) { return; } @@ -42,7 +42,7 @@ class DauxHelper $params['html']['theme'] = array_pop($theme); } - if (!is_dir($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])) { + if (!is_dir(realpath(($params['themes_path'] . DIRECTORY_SEPARATOR . $params['html']['theme'])))) { throw new \RuntimeException("Theme '{$params['html']['theme']}' not found"); } }