diff --git a/lib/private/App/CodeChecker/NodeVisitor.php b/lib/private/App/CodeChecker/NodeVisitor.php
index b7f256ea3d792c3a878be9dab87659fa3299daba..f3e9bb57fceabb2ab37d626b91a3549b36bbe972 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";