diff options
author | Felipe Pena <felipe@php.net> | 2008-07-23 16:28:46 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-07-23 16:28:46 +0000 |
commit | a2cc7ec96a0c4c4839eb99e5044aa52fda20bccf (patch) | |
tree | 362e1b0f68cbfe1c7ae9fae2e44d97cbef79eeff /ext/standard/array.c | |
parent | 48013172bc0a1e124cbb7b9e7f4d4e8bd68b7058 (diff) | |
download | php-git-a2cc7ec96a0c4c4839eb99e5044aa52fda20bccf.tar.gz |
- MFH: Fixed bug #45605 (array_uintersect_assoc gives incorrect error message)
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r-- | ext/standard/array.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c index 5f35c66121..bb8415c44f 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2837,10 +2837,14 @@ static void php_array_intersect_key(INTERNAL_FUNCTION_PARAMETERS, int data_compa /* Get the argument count */ argc = ZEND_NUM_ARGS(); if (data_compare_type == INTERSECT_COMP_DATA_USER) { - if (argc < 3 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+f", &args, &argc, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) { + if (argc < 3) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "at least 3 parameters are required, %d given", ZEND_NUM_ARGS()); return; } + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+f", &args, &argc, &BG(user_compare_fci), &BG(user_compare_fci_cache)) == FAILURE) { + return; + } intersect_data_compare_func = zval_user_compare; } else { if (argc < 2 || zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "+", &args, &argc) == FAILURE) { |