N°7461 - Portal: import user photo don't like some pictures with PHP>=8.1

This commit is contained in:
Anne-Cath
2024-04-17 15:44:52 +02:00
parent e4a3a7d0ca
commit ddc004a147

View File

@@ -2226,8 +2226,8 @@ SQL;
$fScale = min($iMaxImageWidth / $iWidth, $iMaxImageHeight / $iHeight);
$iNewWidth = $iWidth * $fScale;
$iNewHeight = $iHeight * $fScale;
$iNewWidth = floor($iWidth * $fScale);
$iNewHeight = floor($iHeight * $fScale);
$new = imagecreatetruecolor($iNewWidth, $iNewHeight);