Skip to content

Commit 264d19b

Browse files
committed
false for lower branches.
1 parent 60a64dc commit 264d19b

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

ext/gd/gd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3634,8 +3634,7 @@ PHP_FUNCTION(imagescale)
36343634
im = php_gd_libgdimageptr_from_zval_p(IM);
36353635

36363636
if (tmp_h < 0 && tmp_w < 0) {
3637-
zend_value_error("$width and $height cannot be both negative");
3638-
RETURN_THROWS();
3637+
RETURN_FALSE;
36393638
}
36403639

36413640
if (tmp_h < 0 || tmp_w < 0) {

ext/gd/tests/gh17703.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ gd
77

88
$img = imagecreatetruecolor ( 256, 1);
99

10-
try {
11-
imagescale($img, -1, -1, 0);
12-
} catch (\ValueError $e) {
13-
echo $e->getMessage();
14-
}
10+
var_dump(imagescale($img, -1, -1, 0));
1511
?>
1612
--EXPECT--
17-
$width and $height cannot be both negative
13+
bool(false)

0 commit comments

Comments
 (0)