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

Warning message on PHP files consisting of only comments when zend.assertions enabled #1284

Closed
wants to merge 1 commit into from

Conversation

fitztrev
Copy link

@fitztrev fitztrev commented Apr 1, 2019

When PHP's zend.assertions are enabled, there's a Warning when a file is encountered that only contains a comment. This is a failing test to demonstrate #1157.

File contents:

<?php

// A single-line comment

Output:

PHP Warning:  assert(): assert($itemStartPos >= 0 && $itemEndPos >= 0) failed in
vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php on line 753

See the Travis log for this PR for either the DOG_FOOD or RUN_RECTOR builds. Direct link

Screen Shot 2019-04-01 at 11 29 03 AM

@TomasVotruba
Copy link
Member

Any idea how to fix this, while you looked in the code?

@fitztrev
Copy link
Author

No, sorry. I'm not sure what causes it.

@TomasVotruba
Copy link
Member

I see. Without clear cause of this, there is no way to fix it. Closing as won't fix

Thank you for your time investment and investigation

@fitztrev
Copy link
Author

No problem. Thanks for taking a look. I'll re-open my issue in the nikic/PHP-parser repo now that I have steps-to-reproduce and the maintainers there can determine how/if they would like to handle it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants