diff --git a/core/vendor/filemanager/UploadHandler.php b/core/vendor/filemanager/UploadHandler.php index 2f685593..98f8ffbc 100644 --- a/core/vendor/filemanager/UploadHandler.php +++ b/core/vendor/filemanager/UploadHandler.php @@ -14,6 +14,7 @@ class UploadHandler { protected $options; + protected $response; // PHP File Upload error message codes: // http://php.net/manual/en/features.file-upload.errors.php diff --git a/core/vendor/filemanager/include/php_image_magician.php b/core/vendor/filemanager/include/php_image_magician.php index 9ec8e001..43d1b545 100644 --- a/core/vendor/filemanager/include/php_image_magician.php +++ b/core/vendor/filemanager/include/php_image_magician.php @@ -353,8 +353,8 @@ class imageLib { // *** Get optimal width and height - based on $option $dimensionsArray = $this->getDimensions($newWidth, $newHeight, $option); - $optimalWidth = $dimensionsArray['optimalWidth']; - $optimalHeight = $dimensionsArray['optimalHeight']; + $optimalWidth = (int) $dimensionsArray['optimalWidth']; + $optimalHeight = (int) $dimensionsArray['optimalHeight']; // *** Resample - create image canvas of x, y size $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); @@ -463,7 +463,7 @@ class imageLib { else { $color = imagecolorallocate($im, $this->fillColorArray['r'], $this->fillColorArray['g'], $this->fillColorArray['b']); - imagefilledrectangle($im, 0, 0, $width, $height, $color); + imagefilledrectangle($im, 0, 0, (int)$width, (int)$height, $color); } } @@ -483,8 +483,8 @@ class imageLib { // *** Get cropping co-ordinates $cropArray = $this->getCropPlacing($optimalWidth, $optimalHeight, $newWidth, $newHeight, $cropPos); - $cropStartX = $cropArray['x']; - $cropStartY = $cropArray['y']; + $cropStartX = (int)$cropArray['x']; + $cropStartY = (int)$cropArray['y']; // *** Crop this bad boy $crop = imagecreatetruecolor($newWidth, $newHeight); diff --git a/core/vendor/filemanager/include/utils.php b/core/vendor/filemanager/include/utils.php index 9275eaaf..60cd4a61 100644 --- a/core/vendor/filemanager/include/utils.php +++ b/core/vendor/filemanager/include/utils.php @@ -735,8 +735,9 @@ function fix_filename($str, $config, $is_folder = false) } if ($config['transliteration']) { + // Le site est en UTF8 if (!mb_detect_encoding($str, 'UTF-8', true)) { - $str = utf8_encode($str); + $str = mb_convert_encoding($str, 'UTF-8', mb_list_encodings()); } if (function_exists('transliterator_transliterate')) { $str = transliterator_transliterate('Any-Latin; Latin-ASCII', $str);