From 6544175cf291d500d8bac386b7bc2aa39cfdf79a Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Thu, 22 Dec 2016 16:50:45 +0100 Subject: [PATCH] prevent error with realpath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit if some bad caracters are present in the name of file ( ° by exemple) --- htdocs/core/lib/images.lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 9cf745a0da0..201394612bc 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -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 }