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

ParseError: Problem loading method: $storage should not be null for Index::action #9672

Open
olleharstedt opened this issue Apr 18, 2023 · 3 comments

Comments

@olleharstedt
Copy link
Contributor

olleharstedt commented Apr 18, 2023

limesurvey/application/controllers/survey/index.php:32:5:error - ParseError: Problem loading method: $storage should not be null for Index::action                          

You have any idea what this error means? There's no syntax error in the file. Can't find anything about any $storage variable.

https://github.com/LimeSurvey/LimeSurvey/blob/master/application/controllers/survey/index.php#L32

@olleharstedt olleharstedt changed the title limesurvey/application/controllers/survey/index.php:32:5:error - ParseError: Problem loading method: $storage should not be null for Index::action ParseError: Problem loading method: $storage should not be null for Index::action Apr 18, 2023
@olleharstedt
Copy link
Contributor Author

Hey @olleharstedt, can you reproduce the issue on https://psalm.dev ?

Nop, too much code, little bot.

@olleharstedt
Copy link
Contributor Author

Hm seems related to the fact that the class is called index? And that we have two such classes in the code-base. Heh.

@orklah
Copy link
Collaborator

orklah commented Apr 18, 2023

The error means that Psalm has tried to retrieve an object through an index that should be populated with every method but it's empty for Index::action.

Yeah, having two different classes in the same namespace could lead to such issues depending on which class is returned by your autoloading I suppose

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

No branches or pull requests

2 participants