From 3d1d4be9970e24ef2b96f922cf2bd6c3fdcba4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Tempez?= Date: Sun, 28 Jul 2024 18:04:14 +0200 Subject: [PATCH] =?UTF-8?q?Corrige=20la=20g=C3=A9n=C3=A9ration=20des=20min?= =?UTF-8?q?iatures=20au=20format=20avif=20et=20webp?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/core.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/core/core.php b/core/core.php index 5194600..9527f54 100644 --- a/core/core.php +++ b/core/core.php @@ -51,7 +51,7 @@ class common const ACCESS_TIMER = 1800; // Numéro de version - const ZWII_VERSION = '1.10.04'; + const ZWII_VERSION = '1.10.05'; // URL autoupdate const ZWII_UPDATE_URL = 'https://forge.chapril.org/ZwiiCMS-Team/campus-update/raw/branch/master/'; @@ -1204,8 +1204,7 @@ class common $source_image = imagecreatefromwebp($src); break; case 'avif': - $source_image = function_exists('imagecreatefromavif') ? imagecreatefromavif($src) : null; - break; + $source_image = imagecreatefromavif($src); } // Image valide if ($source_image) { @@ -1225,9 +1224,9 @@ class common return (imagepng($virtual_image, $dest)); case 'image/gif': return (imagegif($virtual_image, $dest)); - case 'webp': + case 'image/webp': return (imagewebp($virtual_image, $dest)); - case 'avif': + case 'image/avif': return (imageavif($virtual_image, $dest)); } } else {