From 9f3a31aeab2fd3ae5d8553d35f47e82bb839175a 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 bdd6aee..f82a685 100644 --- a/libs/DauxHelper.php +++ b/libs/DauxHelper.php @@ -30,7 +30,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; } @@ -43,7 +43,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"); } }