Skip to content

Commit 7185982

Browse files
committed
Fix implementation bug
1 parent 629071d commit 7185982

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Zend/zend_language_scanner.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ int start_line = CG(zend_lineno);
18511851
yyleng = YYCURSOR - SCNG(yy_text);
18521852
#line 2291 "Zend/zend_language_scanner.l"
18531853
{
1854-
int newline = 0, indentation, len, new_len, using_spaces, using_tabs;
1854+
int newline = 0, indentation = 0, len, new_len, using_spaces = 0, using_tabs = 0;
18551855

18561856
zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
18571857

@@ -1869,7 +1869,6 @@ int start_line = CG(zend_lineno);
18691869
}
18701870
/* fall through */
18711871
case '\n':
1872-
indentation = using_spaces = using_tabs = 0;
18731872
while (*YYCURSOR == ' ' || *YYCURSOR == '\t') {
18741873
using_spaces |= *YYCURSOR == ' ';
18751874
using_tabs |= *YYCURSOR == '\t';
@@ -1910,6 +1909,7 @@ int start_line = CG(zend_lineno);
19101909

19111910
goto heredoc_scan_done;
19121911
}
1912+
indentation = using_spaces = using_tabs = 0;
19131913
continue;
19141914
case '$':
19151915
if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') {

Zend/zend_language_scanner.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,7 +2289,7 @@ double_quotes_scan_done:
22892289
22902290
22912291
<ST_HEREDOC>{ANY_CHAR} {
2292-
int newline = 0, indentation, len, new_len, using_spaces, using_tabs;
2292+
int newline = 0, indentation = 0, len, new_len, using_spaces = 0, using_tabs = 0;
22932293
22942294
zend_heredoc_label *heredoc_label = zend_ptr_stack_top(&SCNG(heredoc_label_stack));
22952295
@@ -2307,7 +2307,6 @@ double_quotes_scan_done:
23072307
}
23082308
/* fall through */
23092309
case '\n':
2310-
indentation = using_spaces = using_tabs = 0;
23112310
while (*YYCURSOR == ' ' || *YYCURSOR == '\t') {
23122311
using_spaces |= *YYCURSOR == ' ';
23132312
using_tabs |= *YYCURSOR == '\t';
@@ -2348,6 +2347,7 @@ double_quotes_scan_done:
23482347
23492348
goto heredoc_scan_done;
23502349
}
2350+
indentation = using_spaces = using_tabs = 0;
23512351
continue;
23522352
case '$':
23532353
if (IS_LABEL_START(*YYCURSOR) || *YYCURSOR == '{') {

0 commit comments

Comments
 (0)