1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00

Convert to unpacked before deleting elements

Return FAILURE immediately if a string index removal is attempted.

Moved condition higher up
This commit is contained in:
Tjerk Meesters
2014-05-13 09:42:12 +08:00
parent 9f9ee0186e
commit e7b50a8ee9

View File

@@ -675,6 +675,10 @@ ZEND_API int zend_hash_str_del(HashTable *ht, const char *str, int len)
IS_CONSISTENT(ht);
if (ht->u.flags & HASH_FLAG_PACKED) {
return FAILURE;
}
h = zend_inline_hash_func(str, len);
nIndex = h & ht->nTableMask;