]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #45605 (array_uintersect_assoc gives incorrect error message)
authorFelipe Pena <felipe@php.net>
Wed, 23 Jul 2008 16:28:46 +0000 (16:28 +0000)
committerFelipe Pena <felipe@php.net>
Wed, 23 Jul 2008 16:28:46 +0000 (16:28 +0000)
ext/standard/array.c

index 5f35c661219366056c619a8cca9bad7455dea865..bb8415c44f78d81378e1c7a418a3944bab64dbeb 100644 (file)
@@ -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) {