-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
offsetAccess.nonOffsetAccessible suppressed by isset #10926
Comments
/cc @rajyan You've touched this last in phpstan/phpstan-src#1174. Can you please look into this? Array access on stdClass even in isset() leads to fatal error: https://3v4l.org/GVD8v |
I think it's related to but not sure enough why |
it's because stdClass is not final. simply changing this line as
can fix this issue, but haven't fully considered whether this is the right way. |
we can create a class that implements ArrayAccess and extends stdClass at the same time. so, we need to find a good compromise for the conditions for arrayOffsetAccessible that currently depends on ’final’. |
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. |
Bug report
Error
exception is raised but no warning from SA.Code snippet that reproduces the problem
https://phpstan.org/r/4ade25a7-da2a-40ae-b3e3-89713d804052
Expected output
Cannot access offset 'a' on stdClass.
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: