Skip to content

Commit cd9dba8

Browse files
Misterio77derickr
authored andcommittedJul 18, 2023
small fixes
1 parent a48b977 commit cd9dba8

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎Zend/zend_ini_scanner.l

+2-3
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ TABS_AND_SPACES [ \t]
360360
WHITESPACE [ \t]+
361361
CONSTANT [a-zA-Z_][a-zA-Z0-9_]*
362362
LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00]
363-
/* FIXME: Is this missing a \0? */
364363
LABEL ({LABEL_CHAR}+)
365364
TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}]
366365
OPERATORS [&|^~()!]
@@ -372,7 +371,7 @@ RAW_VALUE_CHARS [^\n\r;\000]
372371
373372
LITERAL_DOLLAR ("$"([^{\000]|("\\"{ANY_CHAR})))
374373
VALUE_CHARS ([^$= \t\n\r;&|^~()!"'\000]|{LITERAL_DOLLAR})
375-
FALLBACK_CHARS ([^$\n\r;"'!}\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
374+
FALLBACK_CHARS ([^$\n\r;"'}\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
376375
SECTION_VALUE_CHARS ([^$\n\r;"'\]\\]|("\\"{ANY_CHAR})|{LITERAL_DOLLAR})
377376
378377
<!*> := yyleng = YYCURSOR - SCNG(yy_text);
@@ -600,7 +599,7 @@ end_raw_value_chars:
600599
RETURN_TOKEN(TC_STRING, yytext, yyleng);
601600
}
602601

603-
<ST_VAR_FALLBACK>{FALLBACK_CHARS}+ { /* Same as above, but excluding '}' */
602+
<ST_VAR_FALLBACK>{FALLBACK_CHARS}+ { /* Same as below, but excluding '}' */
604603
RETURN_TOKEN(TC_STRING, yytext, yyleng);
605604
}
606605

‎ext/standard/tests/general_functions/parse_ini_string_error.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Ini parsing errors should not result in memory leaks
44
<?php
55
var_dump(parse_ini_string('a="b'));
66
var_dump(parse_ini_string('a=${b'));
7-
var_dump(parse_ini_string('a=${b!a'));
7+
var_dump(parse_ini_string('a=${b:-a'));
88
?>
99
--EXPECTF--
1010
Warning: syntax error, unexpected end of file, expecting TC_DOLLAR_CURLY or TC_QUOTED_STRING or '"' in Unknown on line 1
@@ -15,6 +15,6 @@ Warning: syntax error, unexpected end of file, expecting TC_FALLBACK or '}' in U
1515
in %s on line %d
1616
bool(false)
1717

18-
Warning: syntax error, unexpected end of file, expecting TC_FALLBACK or '}' in Unknown on line 1
18+
Warning: syntax error, unexpected TC_FALLBACK, expecting TC_VARNAME in Unknown on line 1
1919
in %s on line %d
2020
bool(false)

0 commit comments

Comments
 (0)