Skip to content

Commit e696732

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Canonicalize bison error during ini parsing
2 parents 68527a7 + 3978d3a commit e696732

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Zend/tests/bug70748.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ var_dump(parse_ini_file($ini_file));
1515
unlink(__DIR__ . "/bug70748.ini");
1616
?>
1717
--EXPECTF--
18-
Warning: syntax error, unexpected $end, expecting '}' in %sbug70748.ini on line %d
18+
Warning: syntax error, unexpected end of file, expecting '}' in %sbug70748.ini on line %d
1919
in %sbug70748.php on line %d
2020
bool(false)

Zend/zend_ini_parser.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ static void zval_ini_dtor(zval *zv)
292292
%define api.value.type {zval}
293293
%define parse.error verbose
294294

295+
%token END 0 "end of file"
295296
%token TC_SECTION
296297
%token TC_RAW
297298
%token TC_CONSTANT

ext/standard/tests/general_functions/parse_ini_string_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Ini parsing errors should not result in memory leaks
55
var_dump(parse_ini_string('a="b'));
66
?>
77
--EXPECTF--
8-
Warning: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in Unknown on line 1
8+
Warning: syntax error, unexpected end of file, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in Unknown on line 1
99
in %s on line %d
1010
bool(false)

0 commit comments

Comments
 (0)