Skip to content

Commit a49ce7b

Browse files
committed
Don't return T_ERROR from token_get_all()
This turned out to be rather inconvenient after all. Instead just return the same output we did on PHP 5. If people want to have an error, use TOKEN_PARSE.
1 parent fc5c7e6 commit a49ce7b

7 files changed

+212
-226
lines changed

Zend/zend_compile.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,10 @@ int zendlex(zend_parser_stack_elem *elem) /* {{{ */
15361536
again:
15371537
ZVAL_UNDEF(&zv);
15381538
retval = lex_scan(&zv);
1539+
if (EG(exception)) {
1540+
return T_ERROR;
1541+
}
1542+
15391543
switch (retval) {
15401544
case T_COMMENT:
15411545
case T_DOC_COMMENT:

0 commit comments

Comments
 (0)