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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user