Strange undefined class error in phpstorm

I just started to use phpstorm and I really like it.

I am using code inspector and have found some strange results.

I get repeated "undefined class" errors regarding the mysqli_result class ("Undefined class mysqli_result"). Phpstorm also marks the mysqli associated methods as "undefined".

I have mysqli support compiled into php, so I am not quite sure what to make of this. The code works fine, I am just annoyed by the warnings and want to find out whether I am doing something wrong here.


Comment actions Permalink

Hi there,

1) Please try "File | Invalidate Caches..." and restart IDE

2) If it does not help -- please provide some code sample to reproduce: place it in a brand new project first

Comment actions Permalink

I figured it mistake.

I had modified my classes and started to use namespaces. I had not updated the phpDoc declarations for methods returning mysqli_results. They were lacking a "\" in front to declare them global. Adding those fixed the problem.

Thanks for your help!


Please sign in to leave a comment.