]> granicus.if.org Git - php/commitdiff
Use hash_exists_ind in symbol table
authorXinchen Hui <laruence@gmail.com>
Wed, 2 Mar 2016 04:11:13 +0000 (12:11 +0800)
committerXinchen Hui <laruence@gmail.com>
Wed, 2 Mar 2016 04:11:13 +0000 (12:11 +0800)
Zend/zend_hash.h
ext/standard/array.c

index 0f1580df886b6bb0683a168d54bab5628bc28026..e90763ce8ce6cc51d71f32624f00ff150b7532f6 100644 (file)
@@ -380,7 +380,7 @@ static zend_always_inline int zend_symtable_exists(HashTable *ht, zend_string *k
        if (ZEND_HANDLE_NUMERIC(key, idx)) {
                return zend_hash_index_exists(ht, idx);
        } else {
-               return zend_hash_exists(ht, key);
+               return zend_hash_exists_ind(ht, key);
        }
 }
 
index 6eb85bbec8f44999eae73b761c101c36906acbad..def7d7c465b0d3ab15797af5be2da641d3977812 100644 (file)
@@ -5429,7 +5429,7 @@ PHP_FUNCTION(array_key_exists)
 
        switch (Z_TYPE_P(key)) {
                case IS_STRING:
-                       if (zend_symtable_find_ind(array, Z_STR_P(key))) {
+                       if (zend_symtable_exists(array, Z_STR_P(key))) {
                                RETURN_TRUE;
                        }
                        RETURN_FALSE;