We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60a64dc commit 264d19bCopy full SHA for 264d19b
ext/gd/gd.c
@@ -3634,8 +3634,7 @@ PHP_FUNCTION(imagescale)
3634
im = php_gd_libgdimageptr_from_zval_p(IM);
3635
3636
if (tmp_h < 0 && tmp_w < 0) {
3637
- zend_value_error("$width and $height cannot be both negative");
3638
- RETURN_THROWS();
+ RETURN_FALSE;
3639
}
3640
3641
if (tmp_h < 0 || tmp_w < 0) {
ext/gd/tests/gh17703.phpt
@@ -7,11 +7,7 @@ gd
7
8
$img = imagecreatetruecolor ( 256, 1);
9
10
-try {
11
- imagescale($img, -1, -1, 0);
12
-} catch (\ValueError $e) {
13
- echo $e->getMessage();
14
-}
+var_dump(imagescale($img, -1, -1, 0));
15
?>
16
--EXPECT--
17
-$width and $height cannot be both negative
+bool(false)
0 commit comments