]> git.agnieray.net Git - galette.git/commitdiff
Fix implicit conversion from float to int
authorGuillaume AGNIERAY <dev@agnieray.net>
Wed, 25 Jan 2023 10:24:57 +0000 (11:24 +0100)
committerGuillaume AGNIERAY <dev@agnieray.net>
Wed, 25 Jan 2023 10:24:57 +0000 (11:24 +0100)
galette/lib/Galette/Core/Picture.php

index 3119e3a4162b2ac48e6234a60a1c66c2ed2dcdc1..ea3dceaffb552aeba9304c7ea0b0aa59578bcf77 100644 (file)
@@ -724,9 +724,9 @@ class Picture implements FileInterface
 
             // calculate image size according to ratio
             if ($cur_width > $cur_height) {
-                $h = $w / $ratio;
+                $h = round($w / $ratio);
             } else {
-                $w = $h * $ratio;
+                $w = round($h * $ratio);
             }
 
             $thumb = imagecreatetruecolor($w, $h);