From e8cc181eb041cb8b79564279860b142e9fc45708 Mon Sep 17 00:00:00 2001 From: MDW Date: Mon, 18 Mar 2024 23:43:38 +0100 Subject: [PATCH] Fix arg type for imagecreate* and imagecopy* functions by casting --- htdocs/core/lib/images.lib.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/images.lib.php b/htdocs/core/lib/images.lib.php index 0134180e4d8..258317756d0 100644 --- a/htdocs/core/lib/images.lib.php +++ b/htdocs/core/lib/images.lib.php @@ -1,6 +1,7 @@ * Copyright (C) 2005-2007 Regis Houssin + * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -699,8 +700,8 @@ function vignette($file, $maxWidth = 160, $maxHeight = 120, $extName = '_small', $thumbHeight = $maxHeight; $thumbWidth = $thumbHeight * $imgWhFact; } - $thumbHeight = round($thumbHeight); - $thumbWidth = round($thumbWidth); + $thumbHeight = (int) round($thumbHeight); + $thumbWidth = (int) round($thumbWidth); // Define target format if (empty($targetformat)) {