tabe Mon Jan 19 16:35:58 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/gd gd.c
Log:
MFH: bump up and use IMAGE_FILTER_MAX_ARGS instead of a magic number.
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.312.2.20.2.32.2.29&r2=1.312.2.20.2.32.2.30&diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.312.2.20.2.32.2.29
php-src/ext/gd/gd.c:1.312.2.20.2.32.2.30
--- php-src/ext/gd/gd.c:1.312.2.20.2.32.2.29 Thu Jan 15 07:57:11 2009
+++ php-src/ext/gd/gd.c Mon Jan 19 16:35:58 2009
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: gd.c,v 1.312.2.20.2.32.2.29 2009/01/15 07:57:11 kalle Exp $ */
+/* $Id: gd.c,v 1.312.2.20.2.32.2.30 2009/01/19 16:35:58 tabe Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -143,7 +143,7 @@
#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_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;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php