]> granicus.if.org Git - php/commitdiff
Fix "wrong param count" error message
authorHannes Magnusson <bjori@php.net>
Sun, 8 Oct 2006 15:27:28 +0000 (15:27 +0000)
committerHannes Magnusson <bjori@php.net>
Sun, 8 Oct 2006 15:27:28 +0000 (15:27 +0000)
ext/gd/gd.c

index 15f8096ab97ca5f86763afe1902406771a721ca7..2d39b8989e38b0e1097ad95dcb5b45d6e9d8fdbc 100644 (file)
@@ -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) {