diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 6a056287c451..9ec36b8a6a09 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2114,7 +2114,7 @@ PHP_FUNCTION(imagejpeg) } if (quality < -1 || quality > 100) { - zend_argument_value_error(3, "must be at between -1 and 100"); + zend_argument_value_error(3, "must be between -1 and 100"); ctx->gd_free(ctx); RETURN_THROWS(); } diff --git a/ext/gd/tests/imagejpeg_quality_range.phpt b/ext/gd/tests/imagejpeg_quality_range.phpt new file mode 100644 index 000000000000..a2aa1401a6c0 --- /dev/null +++ b/ext/gd/tests/imagejpeg_quality_range.phpt @@ -0,0 +1,31 @@ +--TEST-- +imagejpeg(): the accepted range of $quality and the message for values outside it +--EXTENSIONS-- +gd +--SKIPIF-- + +--FILE-- +getMessage(), "\n"; + } +} +?> +--CLEAN-- + +--EXPECT-- +imagejpeg(): Argument #3 ($quality) must be between -1 and 100 +bool(true) +bool(true) +bool(true) +imagejpeg(): Argument #3 ($quality) must be between -1 and 100 diff --git a/ext/gd/tests/imageresolution_jpeg.phpt b/ext/gd/tests/imageresolution_jpeg.phpt index a918c7402d2c..fcca0f7f279f 100644 --- a/ext/gd/tests/imageresolution_jpeg.phpt +++ b/ext/gd/tests/imageresolution_jpeg.phpt @@ -43,7 +43,7 @@ array(2) { [1]=> int(299) } -ValueError: imagejpeg(): Argument #3 ($quality) must be at between -1 and 100 +ValueError: imagejpeg(): Argument #3 ($quality) must be between -1 and 100 --CLEAN--