From 23d7fdeef0e938a3b890942a2db15ed1d919c6a5 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 1 Apr 2019 14:31:29 +0200 Subject: [PATCH] Skip check if CONSTANT on real object is used Signed-off-by: Daniel Kesselberg --- lib/private/App/CodeChecker/NodeVisitor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/App/CodeChecker/NodeVisitor.php b/lib/private/App/CodeChecker/NodeVisitor.php index b7f256ea3d..f3e9bb57fc 100644 --- a/lib/private/App/CodeChecker/NodeVisitor.php +++ b/lib/private/App/CodeChecker/NodeVisitor.php @@ -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";