🎨 \utils::RealPath Move var init next to its use

This commit is contained in:
Pierre Goiffon
2019-10-16 17:33:49 +02:00
parent f65f22f333
commit 385b4f8d4a

View File

@@ -2112,13 +2112,13 @@ class utils
*/
final public static function RealPath($sPath, $sBasePath)
{
$sRealBasePath = realpath($sBasePath); // avoid problems when having '/' on Windows for example
$sFileRealPath = realpath($sPath);
if ($sFileRealPath === false)
{
return false;
}
$sRealBasePath = realpath($sBasePath); // avoid problems when having '/' on Windows for example
if (!self::StartsWith($sFileRealPath, $sRealBasePath))
{
return false;