From 87bd330a939aafcfa1be2121ce6a487ffd4142aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Thu, 12 Nov 2026 15:53:46 +0100 Subject: [PATCH] ext/gd: fix imagecreate_error_oversized.phpt on 32-bit On 32-bit platforms 4294967296 is a float that doesn't fit in an int, so imagecreate() and imagecreatetruecolor() throw a TypeError before they check the range, and the test fails. It has failed in the LINUX_X32_DEBUG_ZTS job since it was added in 66c0f525665. Remove that value from the test. The values that remain, PHP_INT_MAX and 2147483647, are valid ints on all platforms. --- ext/gd/tests/imagecreate_error_oversized.phpt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ext/gd/tests/imagecreate_error_oversized.phpt b/ext/gd/tests/imagecreate_error_oversized.phpt index 333a6e7c2086..23e90231f8f0 100644 --- a/ext/gd/tests/imagecreate_error_oversized.phpt +++ b/ext/gd/tests/imagecreate_error_oversized.phpt @@ -4,7 +4,7 @@ imagecreate()/imagecreatetruecolor(): oversized dimensions produce a correct err gd --FILE-- getMessage(), "\n"; } try { imagecreate(1, $v); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } try { imagecreatetruecolor($v, 1); } catch (Throwable $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } @@ -20,7 +20,3 @@ ValueError: imagecreate(): Argument #1 ($width) must be greater than 0 and less ValueError: imagecreate(): Argument #2 ($height) must be greater than 0 and less than %d ValueError: imagecreatetruecolor(): Argument #1 ($width) must be greater than 0 and less than %d ValueError: imagecreatetruecolor(): Argument #2 ($height) must be greater than 0 and less than %d -ValueError: imagecreate(): Argument #1 ($width) must be greater than 0 and less than %d -ValueError: imagecreate(): Argument #2 ($height) must be greater than 0 and less than %d -ValueError: imagecreatetruecolor(): Argument #1 ($width) must be greater than 0 and less than %d -ValueError: imagecreatetruecolor(): Argument #2 ($height) must be greater than 0 and less than %d