-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Offset 'extension' does not exist on array when using #3700
Comments
This bug report is missing a link to reproduction on phpstan.org. |
@chrisrollins65 this should work:
|
@amq yes, but |
@chrisrollins65 Another example : https://phpstan.org/r/53d3160d-0b51-4bb8-add1-e49aecc78458 |
@chrisrollins65 After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-9: Offset 'extension' does not exist on array('dirname' => string, 'basename' => string, 'filename' => string, ?'extension' => string).
+No errors |
@Progi1984 After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-28: Offset 'id_customer' does not exist on array()|array(?'id_country' => int, ?'id_customer' => int).
+No errors |
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
I have the following lines of code:
This results in the error PHPStan error:
I understand that the extension may not exist, but since this code explicitly checks that it does exist, I don't understand why this error is still appearing in PHPStan.
Is this a problem with PHPStan or do I need to change something else in my code?
Code snippet that reproduces the problem
https://phpstan.org/r/cf79be4b-a83a-4a68-b8ff-8fdf8e8ed49f
The text was updated successfully, but these errors were encountered: