Browse Source

Fixed bug #25494 (array_merge allowing "false" as argument (silent when

non-array is passed))
# 4.3 throws E_NOTICEs, 5 errors out on non-array args as per Ilia's
# suggestion.
PEAR_1_4DEV
Jay Smith 23 years ago
parent
commit
6c6fd76bac
  1. 10
      ext/standard/array.c

10
ext/standard/array.c

@ -2209,7 +2209,15 @@ static void php_array_merge_wrapper(INTERNAL_FUNCTION_PARAMETERS, int recursive)
efree(args);
WRONG_PARAM_COUNT;
}
for (i=0; i<argc; i++) {
if (Z_TYPE_PP(args[i]) != IS_ARRAY) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Argument #%d is not an array", i+1);
efree(args);
return;
}
}
array_init(return_value);
for (i=0; i<argc; i++) {

Loading…
Cancel
Save