MFH: Fix double "wrong param count" messages

This commit is contained in:
Hannes Magnusson 2006-11-03 15:13:17 +00:00
parent 91c604d584
commit 5006fb2ceb
2 changed files with 5 additions and 3 deletions

View File

@ -5057,8 +5057,10 @@ PHP_FUNCTION(imagefilter)
php_image_filter_smooth php_image_filter_smooth
}; };
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 5 || zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) { if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 5) {
ZEND_WRONG_PARAM_COUNT(); WRONG_PARAM_COUNT;
} else if (zend_parse_parameters(2 TSRMLS_CC, "rl", &tmp, &filtertype) == FAILURE) {
return;
} }
if (filtertype >= 0 && filtertype <= IMAGE_FILTER_MAX) { if (filtertype >= 0 && filtertype <= IMAGE_FILTER_MAX) {

View File

@ -1022,7 +1022,7 @@ SPL_METHOD(Array, exchangeArray)
zend_hash_copy(HASH_OF(return_value), spl_array_get_hash_table(intern, 0 TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, &tmp, sizeof(zval*)); zend_hash_copy(HASH_OF(return_value), spl_array_get_hash_table(intern, 0 TSRMLS_CC), (copy_ctor_func_t) zval_add_ref, &tmp, sizeof(zval*));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &array) == FAILURE) { if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z", &array) == FAILURE) {
WRONG_PARAM_COUNT; return;
} }
if (Z_TYPE_PP(array) == IS_OBJECT && intern == (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) { if (Z_TYPE_PP(array) == IS_OBJECT && intern == (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC)) {
zval_ptr_dtor(&intern->array); zval_ptr_dtor(&intern->array);