From 46e374860b57d9b0ead7a174dce746586b1eb050 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= <danxuliu@gmail.com>
Date: Mon, 16 Mar 2020 16:48:25 +0100
Subject: [PATCH] Fix single "ScopeContext" passed to "setScopes"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

"setScopes" expects an array, but a single "ScopeContext" was being
passed instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
---
 apps/workflowengine/lib/Service/RuleMatcher.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php
index d73fe752f74..99a5db8a9d0 100644
--- a/apps/workflowengine/lib/Service/RuleMatcher.php
+++ b/apps/workflowengine/lib/Service/RuleMatcher.php
@@ -143,7 +143,7 @@ class RuleMatcher implements IRuleMatcher {
 				if ($this->entity->isLegitimatedForUserId($scopeCandidate->getScopeId())) {
 					$ctx = new LogContext();
 					$ctx
-						->setScopes($scopeCandidate)
+						->setScopes([$scopeCandidate])
 						->setEntity($this->entity)
 						->setOperation($this->operation);
 					$this->logger->logScopeExpansion($ctx);
-- 
GitLab