Skip to content

Commit f2940b7

Browse files
committed
Fixed bug #69017 (Fail to push to the empty array with the constant value defined in class scope)
1 parent e6d8bad commit f2940b7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2015, PHP 5.5.23
44

5+
- Core:
6+
. Fixed bug #69017 (Fail to push to the empty array with the constant value
7+
defined in class scope). (Laruence)
8+
59
- ODBC:
610
. Bug #68964 (Allowed memory size exhausted with odbc_exec). (Anatol)
711

Zend/zend_hash.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,9 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, const
14151415

14161416
if (key_type == HASH_KEY_IS_LONG) {
14171417
p->h = num_index;
1418+
if ((long)num_index >= (long)ht->nNextFreeElement) {
1419+
ht->nNextFreeElement = num_index < LONG_MAX ? num_index + 1 : LONG_MAX;
1420+
}
14181421
} else {
14191422
p->h = h;
14201423
p->nKeyLength = str_length;

0 commit comments

Comments
 (0)