Merge pull request #14925 from nextcloud/bugfix/14824-skip-check

Skip check if CONSTANT on real object is used
This commit is contained in:
Roeland Jago Douma 2019-04-02 22:55:52 +02:00 committed by GitHub
commit cffa71ab33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ class NodeVisitor extends NodeVisitorAbstract {
if ($node->class instanceof Name) {
$this->checkBlackList($node->class->toString(), CodeChecker::CLASS_CONST_FETCH_NOT_ALLOWED, $node);
}
if ($node->class instanceof Node\Expr\Variable) {
if ($node->class instanceof Node\Expr\Variable || $node->class instanceof Node\Expr\PropertyFetch) {
/**
* TODO: find a way to detect something like this:
* $c = "OC_API";