mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed NULL pointer def in ext/standard/tests/array/array_fill_keys_variation2.php
This commit is contained in:
parent
36f01f158c
commit
75d567ef9a
1 changed files with 4 additions and 0 deletions
|
@ -1525,6 +1525,10 @@ PHP_FUNCTION(array_fill_keys)
|
|||
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(keys), &pos);
|
||||
while ((entry = zend_hash_get_current_data_ex(Z_ARRVAL_P(keys), &pos)) != NULL) {
|
||||
|
||||
if (UNEXPECTED(Z_ISREF_P(entry))) {
|
||||
entry = Z_REFVAL_P(entry);
|
||||
}
|
||||
|
||||
if (Z_TYPE_P(entry) == IS_LONG) {
|
||||
zval_add_ref(val);
|
||||
zend_hash_index_update(Z_ARRVAL_P(return_value), Z_LVAL_P(entry), val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue