Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokenizer does not change heredoc to nowdoc token if the start tag contains spaces #1979

Closed
wants to merge 1 commit into from

Conversation

michalbundyra
Copy link
Contributor

@michalbundyra michalbundyra commented Apr 2, 2018

<<< 'EOF' is a valid nowdoc start tag (there could be more than one space, or even tab ...)

… spaces

"<<< 'EOF'" is a valid nowdoc start tag.
@gsherwood gsherwood changed the title Fixed changing heredoc to nowdoc token in case the start tag contains spaces Tokenizer does not change heredoc to nowdoc token if the start tag contains spaces Apr 4, 2018
gsherwood added a commit that referenced this pull request Apr 4, 2018
@gsherwood gsherwood added this to the 3.3.0 milestone Apr 4, 2018
@gsherwood
Copy link
Member

Thanks for reporting this, although I fixed it using a strpos rather than using a regex because it is faster and PHP wont allow things like newlines and comments as part of that tag. If you've think I've made a mistake there, please let me know.

@gsherwood gsherwood closed this Apr 4, 2018
@michalbundyra
Copy link
Contributor Author

@gsherwood Solution with strpos instead of regular expression looks good for me! Thanks!

@michalbundyra michalbundyra deleted the hotfix/nowdoc branch April 4, 2018 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants