mirror of
https://github.com/php/php-src.git
synced 2024-12-25 09:49:08 +08:00
- MFH: Fixed bug #45605 (array_uintersect_assoc gives incorrect error message)
This commit is contained in:
parent
48013172bc
commit
a2cc7ec96a
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user