}
if ((*value)->type == IS_ARRAY || (*value)->type == IS_OBJECT) {
- zend_error(E_WARNING, "Wrong datatype for first argument in call to in_array()");
+ php_error(E_WARNING, "Wrong datatype for first argument in call to in_array()");
return;
}
if ((*array)->type != IS_ARRAY) {
- zend_error(E_WARNING, "Wrong datatype for second argument in call to in_array()");
+ php_error(E_WARNING, "Wrong datatype for second argument in call to in_array()");
return;
}
}
if (extype < EXTR_OVERWRITE || extype > EXTR_PREFIX_ALL) {
- zend_error(E_WARNING, "Wrong argument in call to extract()");
+ php_error(E_WARNING, "Wrong argument in call to extract()");
return;
}
if ((*var_array)->type != IS_ARRAY) {
- zend_error(E_WARNING, "Wrong datatype in call to extract()");
+ php_error(E_WARNING, "Wrong datatype in call to extract()");
return;
}
/* Get first argument and check that it's an array */
stack = *args[0];
if (stack->type != IS_ARRAY) {
- zend_error(E_WARNING, "First argument to array_push() needs to be an array");
+ php_error(E_WARNING, "First argument to array_push() needs to be an array");
RETURN_FALSE;
}
}
if ((*stack)->type != IS_ARRAY) {
- zend_error(E_WARNING, "The argument needs to be an array");
+ php_error(E_WARNING, "The argument needs to be an array");
return;
}
/* Get first argument and check that it's an array */
stack = *args[0];
if (stack->type != IS_ARRAY) {
- zend_error(E_WARNING, "First argument to array_unshift() needs to be an array");
+ php_error(E_WARNING, "First argument to array_unshift() needs to be an array");
RETURN_FALSE;
}
/* Get first argument and check that it's an array */
array = *args[0];
if (array->type != IS_ARRAY) {
- zend_error(E_WARNING, "First argument to array_splice() should be an array");
+ php_error(E_WARNING, "First argument to array_splice() should be an array");
efree(args);
return;
}
}
if ((*input)->type != IS_ARRAY) {
- zend_error(E_WARNING, "First argument to array_slice() should be an array");
+ php_error(E_WARNING, "First argument to array_slice() should be an array");
return;
}
for (i=0; i<argc; i++) {
if ((*args[i])->type != IS_ARRAY) {
- zend_error(E_WARNING, "Skipping argument #%d to array_merge(), since it's not an array", i+1);
+ php_error(E_WARNING, "Skipping argument #%d to array_merge(), since it's not an array", i+1);
continue;
}
hash = (*args[i])->value.ht;
}
if ((*input)->type != IS_ARRAY) {
- zend_error(E_WARNING, "First argument to array_keys() should be an array");
+ php_error(E_WARNING, "First argument to array_keys() should be an array");
return;
}
}
if ((*input)->type != IS_ARRAY) {
- zend_error(E_WARNING, "Argument to array_values() should be an array");
+ php_error(E_WARNING, "Argument to array_values() should be an array");
return;
}
}
if ((*input)->type != IS_ARRAY) {
- zend_error(E_WARNING, "Argument to array_count_values() should be an array");
+ php_error(E_WARNING, "Argument to array_count_values() should be an array");
return;
}
(*tmp)->value.lval++;
}
} else {
- zend_error(E_WARNING, "Can only count STRING and INTEGER values!");
+ php_error(E_WARNING, "Can only count STRING and INTEGER values!");
}
zend_hash_move_forward(myht);
}
if ((*input)->type != IS_ARRAY) {
- zend_error(E_WARNING, "Argument to array_reverse() should be an array");
+ php_error(E_WARNING, "Argument to array_reverse() should be an array");
return;
}
if (argc < 2 || argc > 3 || getParametersEx(ht, &input, &value_exp, &key_exp) == FAILURE) {
WRONG_PARAM_COUNT;
}
+
+ if ((*input)->type != IS_ARRAY) {
+ php_error(E_WARNING, "First argument to %s should be an array",
+ get_active_function_name());
+ }
}