summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/array.c')
-rw-r--r--ext/standard/array.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 413ed319d7..ffa695f26d 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -6332,23 +6332,13 @@ PHP_FUNCTION(array_map)
PHP_FUNCTION(array_key_exists)
{
zval *key;
- zval *array;
HashTable *ht;
ZEND_PARSE_PARAMETERS_START(2, 2)
Z_PARAM_ZVAL(key)
- Z_PARAM_ARRAY_OR_OBJECT(array)
+ Z_PARAM_ARRAY_HT(ht)
ZEND_PARSE_PARAMETERS_END();
- if (EXPECTED(Z_TYPE_P(array) == IS_ARRAY)) {
- ht = Z_ARRVAL_P(array);
- } else {
- ht = zend_get_properties_for(array, ZEND_PROP_PURPOSE_ARRAY_CAST);
- php_error_docref(NULL, E_DEPRECATED,
- "Using array_key_exists() on objects is deprecated. "
- "Use isset() or property_exists() instead");
- }
-
switch (Z_TYPE_P(key)) {
case IS_STRING:
RETVAL_BOOL(zend_symtable_exists_ind(ht, Z_STR_P(key)));
@@ -6363,10 +6353,6 @@ PHP_FUNCTION(array_key_exists)
php_error_docref(NULL, E_WARNING, "The first argument should be either a string or an integer");
RETVAL_FALSE;
}
-
- if (Z_TYPE_P(array) != IS_ARRAY) {
- zend_release_properties(ht);
- }
}
/* }}} */