Merge branch 'PHP-7.3'

This commit is contained in:
Nikita Popov 2019-01-10 10:58:07 +01:00
commit cf3317c790
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,14 @@
--TEST--
Bug #77439: parse_str segfaults when inserting item into existing array
--FILE--
<?php
$a = [];
parse_str('a[1]=1');
var_dump($a);
?>
--EXPECTF--
Deprecated: parse_str(): Calling parse_str() without the result argument is deprecated in %s on line %d
array(1) {
[1]=>
string(1) "1"
}

View file

@ -224,6 +224,8 @@ PHPAPI void php_register_variable_ex(char *var_name, zval *val, zval *track_vars
if (Z_TYPE_P(gpc_element_p) != IS_ARRAY) {
zval_ptr_dtor_nogc(gpc_element_p);
array_init(gpc_element_p);
} else {
SEPARATE_ARRAY(gpc_element_p);
}
}
}