You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Zend/zend_language_scanner.l
+15Lines changed: 15 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2405,6 +2405,9 @@ skip_escape_conversion:
2405
2405
if (!IS_LABEL_SUCCESSOR(YYCURSOR[heredoc_label->length])) {
2406
2406
if (spacing == (HEREDOC_USING_SPACES | HEREDOC_USING_TABS)) {
2407
2407
zend_throw_exception(zend_ce_parse_error, "Invalid indentation - tabs and spaces cannot be mixed", 0);
2408
+
if (PARSER_MODE()) {
2409
+
RETURN_TOKEN(T_ERROR);
2410
+
}
2408
2411
}
2409
2412
2410
2413
YYCURSOR = saved_cursor;
@@ -2421,6 +2424,7 @@ skip_escape_conversion:
2421
2424
zend_lex_state current_state;
2422
2425
int heredoc_nesting_level = 1;
2423
2426
int first_token = 0;
2427
+
int error = 0;
2424
2428
2425
2429
zend_save_lexical_state(¤t_state);
2426
2430
@@ -2468,6 +2472,7 @@ skip_escape_conversion:
2468
2472
|| first_token == T_CURLY_OPEN
2469
2473
) && SCNG(heredoc_indentation)) {
2470
2474
zend_throw_exception_ex(zend_ce_parse_error, 0, "Invalid body indentation level (expecting an indentation level of at least %d)", SCNG(heredoc_indentation));
0 commit comments