diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index efbe331104ab6..5f2ef463a41aa 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -385,7 +385,7 @@ static zval *spl_array_get_dimension_ptr(bool check_inherited, spl_array_object case BP_VAR_W: { zval value; ZVAL_NULL(&value); - retval = zend_hash_update(ht, key.key, &value); + retval = zend_hash_add_new(ht, key.key, &value); } } } @@ -406,7 +406,7 @@ static zval *spl_array_get_dimension_ptr(bool check_inherited, spl_array_object case BP_VAR_W: { zval value; ZVAL_NULL(&value); - retval = zend_hash_index_update(ht, key.h, &value); + retval = zend_hash_index_add_new(ht, key.h, &value); } } }