prevent error with realpath

if some bad caracters are present in the name of file ( ° by exemple)
This commit is contained in:
BENKE Charlie 2016-12-22 16:50:45 +01:00 committed by GitHub
parent 1307b93d55
commit 6544175cf2

View File

@ -78,6 +78,9 @@ function dol_getImageSize($file, $url = false)
if (!$url)
{
$fichier = realpath($file); // Chemin canonique absolu de l'image
// if problem with realpath
if ($fichier == false)
return $ret;
$dir = dirname($file); // Chemin du dossier contenant l'image
}