File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -2826,12 +2826,7 @@ PHP_FUNCTION(array_fill_keys)
28262826 ZEND_PARSE_PARAMETERS_END ();
28272827
28282828 /* Initialize return array */
2829- uint32_t keys_count = zend_hash_num_elements (Z_ARRVAL_P (keys ));
2830- array_init_size (return_value , keys_count );
2831-
2832- if (Z_REFCOUNTED_P (val )) {
2833- GC_ADDREF_EX (Z_COUNTED_P (val ), keys_count );
2834- }
2829+ array_init_size (return_value , zend_hash_num_elements (Z_ARRVAL_P (keys )));
28352830
28362831 ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (keys ), entry ) {
28372832 ZVAL_DEREF (entry );
@@ -2846,7 +2841,7 @@ PHP_FUNCTION(array_fill_keys)
28462841 } ZEND_HASH_FOREACH_END ();
28472842
28482843 if (Z_REFCOUNTED_P (val )) {
2849- GC_DELREF_EX (Z_COUNTED_P (val ), keys_count - zend_hash_num_elements (Z_ARRVAL_P (return_value )));
2844+ GC_ADDREF_EX (Z_COUNTED_P (val ), zend_hash_num_elements (Z_ARRVAL_P (return_value )));
28502845 }
28512846}
28522847/* }}} */
You can’t perform that action at this time.
0 commit comments