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

SimpleXmlElement is not always casted to true #2997

Closed
jderusse opened this issue Feb 16, 2020 · 2 comments
Closed

SimpleXmlElement is not always casted to true #2997

jderusse opened this issue Feb 16, 2020 · 2 comments

Comments

@jderusse
Copy link

jderusse commented Feb 16, 2020

When casting a SimpleXMLElement to bool, it can be true or false (cf: https://3v4l.org/aOHT6)

But, when using a ternary operator on a SimpleXMLElement phpstan reports a violation Ternary operator condition is always true.: https://phpstan.org/r/7e2a4df7-90db-4dd3-85a4-a7f207fcafe8

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@83c1e0b

@github-actions
Copy link

github-actions bot commented May 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants