mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Add destructor annotations in ini parser
This commit is contained in:
commit
e4b12fc62a
2 changed files with 11 additions and 1 deletions
|
@ -310,7 +310,7 @@ static void zval_ini_dtor(zval *zv)
|
|||
%left '|' '&' '^'
|
||||
%right '~' '!'
|
||||
|
||||
%destructor { zval_ini_dtor(&$$); } TC_RAW TC_CONSTANT TC_NUMBER TC_STRING TC_WHITESPACE TC_LABEL TC_OFFSET TC_VARNAME BOOL_TRUE BOOL_FALSE NULL_NULL
|
||||
%destructor { zval_ini_dtor(&$$); } TC_RAW TC_CONSTANT TC_NUMBER TC_STRING TC_WHITESPACE TC_LABEL TC_OFFSET TC_VARNAME BOOL_TRUE BOOL_FALSE NULL_NULL cfg_var_ref constant_literal constant_string encapsed_list expr option_offset section_string_or_value string_or_value var_string_list var_string_list_section
|
||||
|
||||
%%
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--TEST--
|
||||
Ini parsing errors should not result in memory leaks
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(parse_ini_string('a="b'));
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in Unknown on line 1
|
||||
in %s on line %d
|
||||
bool(false)
|
Loading…
Add table
Add a link
Reference in a new issue