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

False positive for isset on static access #3089

Closed
mokraemer opened this issue Aug 13, 2019 · 0 comments · Fixed by #3090
Closed

False positive for isset on static access #3089

mokraemer opened this issue Aug 13, 2019 · 0 comments · Fixed by #3090

Comments

@mokraemer
Copy link

mokraemer commented Aug 13, 2019

having the following class

class X{
	/** @var array<string,string> */
	static $queryCache = [];

	function query(string $hash, string $query): string{
		if(isset(self::$queryCache[$hash])){ //emmits PhanPluginUndeclaredVariableIsset undeclared variable $self in isset()
			return self::$queryCache[$hash];
		}
		return $query;
	}

}

phan warns that $self is undeclared, which is obviously nonsense

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

Successfully merging a pull request may close this issue.

1 participant