Skip to content

Commit 54b0929

Browse files
committed
[ci skip] comment
1 parent 9874264 commit 54b0929

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Zend/zend_vm_def.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6162,6 +6162,9 @@ ZEND_VM_C_LABEL(add_unpack_again):
61626162
zval *val;
61636163

61646164
if (HT_IS_PACKED(ht) && (zend_hash_num_elements(result_ht) == 0 || HT_IS_PACKED(result_ht))) {
6165+
/* zend_hash_extend() skips initialization when the number of elements is 0,
6166+
* but the code below expects that result_ht is initialized as packed.
6167+
* We can just skip the work in that case. */
61656168
if (result_ht->nNumUsed + zend_hash_num_elements(ht) > 0) {
61666169
zend_hash_extend(result_ht, result_ht->nNumUsed + zend_hash_num_elements(ht), 1);
61676170
ZEND_HASH_FILL_PACKED(result_ht) {

Zend/zend_vm_execute.h

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)