mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
🎨 \utils::RealPath Move var init next to its use
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user