1
0
mirror of https://github.com/php/php-src.git synced 2026-03-27 17:52:16 +01:00

MFH: bump up and use IMAGE_FILTER_MAX_ARGS instead of a magic number.

This commit is contained in:
Takeshi Abe
2009-01-19 16:35:58 +00:00
parent f9de6e62a9
commit 78ca92f77b

View File

@@ -143,7 +143,7 @@ int gdImageColorClosestHWB(gdImagePtr im, int r, int g, int b);
#define IMAGE_FILTER_SMOOTH 10
#define IMAGE_FILTER_PIXELATE 11
#define IMAGE_FILTER_MAX 11
#define IMAGE_FILTER_MAX_ARGS 5
#define IMAGE_FILTER_MAX_ARGS 6
static void php_image_filter_negate(INTERNAL_FUNCTION_PARAMETERS);
static void php_image_filter_grayscale(INTERNAL_FUNCTION_PARAMETERS);
static void php_image_filter_brightness(INTERNAL_FUNCTION_PARAMETERS);
@@ -4966,7 +4966,7 @@ PHP_FUNCTION(imagefilter)
php_image_filter_pixelate
};
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 6) {
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > IMAGE_FILTER_MAX_ARGS) {
WRONG_PARAM_COUNT;
} else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) {
return;