🐛 fix regression introduced by the PR n°98

the realpath removed the trailing / wich is required
This commit is contained in:
bruno DA SILVA
2019-11-06 10:00:55 +01:00
parent da5ccaaa85
commit 45536cf957

View File

@@ -841,7 +841,7 @@ class utils
$sCurrentScript = realpath($_SERVER['SCRIPT_FILENAME']);
$sCurrentScript = str_replace('\\', '/', $sCurrentScript); // canonical path
$sAppRoot = str_replace('\\', '/', realpath(APPROOT)); // canonical path
$sAppRoot = str_replace('\\', '/', realpath(APPROOT)).'/'; // canonical path with the trailing '/' appended
$sCurrentRelativePath = str_replace($sAppRoot, '', $sCurrentScript);
$sAppRootPos = strpos($sAbsoluteUrl, $sCurrentRelativePath);