mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
@- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi)
This commit is contained in:
parent
7b2fd2c6c9
commit
4974f268a6
@ -1054,11 +1054,13 @@ static void php_search_array(INTERNAL_FUNCTION_PARAMETERS, int behavior)
|
||||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &value, &array, &strict) == FAILURE) {
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
|
||||
#ifndef ZEND_ENGINE_2
|
||||
if (Z_TYPE_PP(value) == IS_OBJECT) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong datatype for first argument");
|
||||
RETURN_FALSE;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (Z_TYPE_PP(array) != IS_ARRAY) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Wrong datatype for second argument");
|
||||
|
Loading…
Reference in New Issue
Block a user