Ctrl+click not finding variable declaration inside if statement

I have a variable like $theVar created in one file (this is PDC, Previous Developer Code) inside of an if statement like:

if(!isset($theVar) || !is_array($theVar) || !$theVar) {
$theVar = array();

Then another file uses it, but when I Ctrl+click the var in the 2nd file, it only finds instances in the 2nd file... if I move $theVar outside of the if statement, in any way, like this:

$theVar = !isset($theVar) || !is_array($theVar) || !$theVar ? array() : $theVar;

it finds it... 

I'm not seeing any setting to change this nor any documentation or other questions about it.

1 comment

It's a bug, please vote here: https://youtrack.jetbrains.com/issue/WI-34554
I'll also leave a link to this thread there in a private comment.


Please sign in to leave a comment.