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

DisallowShortOpenTagSniff does not always recognize short open tags #1398

Closed
jrfnl opened this issue Mar 22, 2017 · 0 comments · Fixed by #1400
Closed

DisallowShortOpenTagSniff does not always recognize short open tags #1398

jrfnl opened this issue Mar 22, 2017 · 0 comments · Fixed by #1400

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Mar 22, 2017

When the short_open_tags ini setting is turned off on the system PHPCS is being run on, short open tags used within T_INLINE_HTML are not recognized by the sniff.

If you have no control over the servers where code is being deployed (open source projects), this can be dangerous as there might well be short open tags remaining in the code in that case and the server on which the code is deployed might have the setting turned on.

While these can't reliably be fixed, they can be warned about when found.

Test case:

Some content <? echo $var; ?> Some more content

Some content <?
echo $var;
?> Some more content

Related #1234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants