Core update : fix CanUpdateCore result never displayed on server with warning enabled

Was caused by a call to :
\Combodo\iTop\FilesInformation\Service\FilesInformationUtils::Scan
With path set to ''. Made from :
\Combodo\iTop\FilesInformation\Service\FilesInformation::CanUpdateCore
This commit is contained in:
Pierre Goiffon
2019-12-20 18:37:51 +01:00
parent 0d231d9b94
commit 0b3895e39e

View File

@@ -24,10 +24,16 @@ class FilesInformationUtils
*/
public static function Scan($sPath = '', $bGetDirSize = true)
{
$sRealRootPath = utils::AbsolutePath($sPath);
$aFiles = scandir($sRealRootPath);
$aFileStats = array();
$sRealRootPath = utils::AbsolutePath($sPath);
if (empty($sRealRootPath))
{
return $aFileStats;
}
$aFiles = scandir($sRealRootPath);
foreach ($aFiles as $sScanFile)
{
if ($sScanFile == '..')