From c7e2b9e69dc699e98c59e871030db9d39fa89844 Mon Sep 17 00:00:00 2001 From: Lars Michelsen Date: Mon, 2 Oct 2023 08:42:11 +0200 Subject: [PATCH] FIX: Fix "implicit conversion from float" on overview page background image preview fixes #355 --- ChangeLog | 1 + share/server/core/classes/CoreModOverview.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4300af21a..841c6d5a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 1.9.37 Frontend: + * FIX: Fix "implicit conversion from float" on overview page background image preview * FIX: Sound events, which are triggered e.g. in case an object turns CRITICAL, now work in modern browsers (Edge 12+, Firefox 20+, Internet Explorer 9+, Opera 15+, Safari 4+, Chrome) diff --git a/share/server/core/classes/CoreModOverview.php b/share/server/core/classes/CoreModOverview.php index dd5b6645c..cecb2775a 100644 --- a/share/server/core/classes/CoreModOverview.php +++ b/share/server/core/classes/CoreModOverview.php @@ -371,7 +371,7 @@ private function createThumbnail($imgPath, $thumbPath) { imagefill($thumb, 0, 0, imagecolorallocate($thumb, 255, 255, 254)); imagecolortransparent($thumb, imagecolorallocate($thumb, 255, 255, 254)); - imagecopyresampled($thumb, $image, $thumbX, $thumbY, 0, 0, $thumbWidth, $thumbHeight, $bgWidth, $bgHeight); + imagecopyresampled($thumb, $image, (int)$thumbX, (int)$thumbY, 0, 0, (int)$thumbWidth, (int)$thumbHeight, (int)$bgWidth, (int)$bgHeight); switch($imgSize[2]) { case 1: