Code editor shows errors when there are none (6.0.1)

PHPStorm 6.0.1 is continually showing errors in my code when there clearly aren't any. It's like it has 'forgotten' how to interpret PHP.

Here's an example: http://i.imgur.com/dB1rqM2.png

Problems:

1. Function params (line 12) are grey underlined as 'unused' in the local space. This is clearly wrong as you can see in the SQL it's being used.
2. "curDistance" is underlined as red and says it's "undefined." Two lines (line 21) up you can clearly see it is in fact defined.

If I copy the code and paste it just below it (and change the method name so we don't have conflicts) there are magically no errors (until I start making edits on some line, then it will 'forget' how to interpret again.)

Example of this: http://i.imgur.com/qvRjeP9.png

Any ideas what's going on?

3 comments
Comment actions Permalink

Hi there,

To start with -- I suggest "File | Invalidate caches..." -- very often it's enough to fix such out-of-nowhere behaviour.

0
Comment actions Permalink

Seems that did the trick. Thank you!

0
Comment actions Permalink

Thank you as well! This was driving me nuts!


0

Please sign in to leave a comment.