mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #26463 (Incorrect handling of semicolons after heredoc)
This commit is contained in:
parent
bfa36a8ea7
commit
99dec6927c
5 changed files with 145 additions and 12 deletions
|
@ -361,7 +361,12 @@ static void tokenize(zval *return_value TSRMLS_DC)
|
|||
MAKE_STD_ZVAL(keyword);
|
||||
array_init(keyword);
|
||||
add_next_index_long(keyword, token_type);
|
||||
add_next_index_stringl(keyword, zendtext, zendleng, 1);
|
||||
if (token_type == T_END_HEREDOC) {
|
||||
add_next_index_stringl(keyword, Z_STRVAL(token), Z_STRLEN(token), 1);
|
||||
efree(Z_STRVAL(token));
|
||||
} else {
|
||||
add_next_index_stringl(keyword, zendtext, zendleng, 1);
|
||||
}
|
||||
add_next_index_zval(return_value, keyword);
|
||||
} else {
|
||||
add_next_index_stringl(return_value, zendtext, zendleng, 1);
|
||||
|
@ -369,9 +374,6 @@ static void tokenize(zval *return_value TSRMLS_DC)
|
|||
if (destroy && Z_TYPE(token) != IS_NULL) {
|
||||
zval_dtor(&token);
|
||||
}
|
||||
if (token_type == T_END_HEREDOC) {
|
||||
efree(Z_STRVAL(token));
|
||||
}
|
||||
ZVAL_NULL(&token);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue