diff options
Diffstat (limited to 'apps/workflowengine')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index 34dbf507b91..f6c3e3086c2 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -109,8 +109,8 @@ class Manager implements IManager { /** @var ILogger */ protected $logger; - /** @var CappedMemoryCache */ - protected $operationsByScope = []; + /** @var CappedMemoryCache<int[]> */ + protected CappedMemoryCache $operationsByScope; /** @var IUserSession */ protected $session; @@ -350,10 +350,11 @@ class Manager implements IManager { $qb->setParameters(['scope' => $scopeContext->getScope(), 'scopeId' => $scopeContext->getScopeId()]); $result = $qb->execute(); - $this->operationsByScope[$scopeContext->getHash()] = []; + $operations = []; while (($opId = $result->fetchOne()) !== false) { - $this->operationsByScope[$scopeContext->getHash()][] = (int)$opId; + $operations[] = (int)$opId; } + $this->operationsByScope[$scopeContext->getHash()] = $operations; $result->closeCursor(); return in_array($id, $this->operationsByScope[$scopeContext->getHash()], true); |