From: Hannes Magnusson Date: Sun, 8 Oct 2006 15:27:28 +0000 (+0000) Subject: Fix "wrong param count" error message X-Git-Tag: RELEASE_1_0_0RC1~1349 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=527af42bd4a8d7e1260f04976967b50e71233986;p=php Fix "wrong param count" error message --- diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 15f8096ab9..2d39b8989e 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -4509,8 +4509,10 @@ PHP_FUNCTION(imagefilter) php_image_filter_smooth }; - if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 5 || zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) { - ZEND_WRONG_PARAM_COUNT(); + if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 5) { + WRONG_PARAM_COUNT; + } else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) { + return; } if (filtertype >= 0 && filtertype <= IMAGE_FILTER_MAX) {