realpath returns the canonicalized absolute pathname

Cette révision appartient à :
Sam Hermans 2016-07-28 11:18:24 +03:00 révisé par Stéphane Goetz
Parent 15c4da62d9
révision 9f3a31aeab
1 fichiers modifiés avec 2 ajouts et 2 suppressions

Voir le fichier

@ -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");
}
}