8
0
Fork 0

realpath returns the canonicalized absolute pathname

Dieser Commit ist enthalten in:
Sam Hermans 2016-07-28 11:18:24 +03:00 committet von Stéphane Goetz
Ursprung 15c4da62d9
Commit 9f3a31aeab
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -30,7 +30,7 @@ class DauxHelper
return; 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; return;
} }
@ -43,7 +43,7 @@ class DauxHelper
$params['html']['theme'] = array_pop($theme); $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"); throw new \RuntimeException("Theme '{$params['html']['theme']}' not found");
} }
} }