do not break on Checkers that do not need specific context info

request time, for example

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2019-10-29 17:57:53 +01:00
parent 580c8355b2
commit 9c766cf03f
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
2 changed files with 1 additions and 7 deletions

View File

@ -24,12 +24,9 @@ declare(strict_types=1);
namespace OCA\WorkflowEngine\Service; namespace OCA\WorkflowEngine\Service;
use OCA\WorkflowEngine\AppInfo\Application;
use OCA\WorkflowEngine\Entity\File;
use OCA\WorkflowEngine\Helper\ScopeContext; use OCA\WorkflowEngine\Helper\ScopeContext;
use OCA\WorkflowEngine\Manager; use OCA\WorkflowEngine\Manager;
use OCP\AppFramework\QueryException; use OCP\AppFramework\QueryException;
use OCP\Files\Node;
use OCP\Files\Storage\IStorage; use OCP\Files\Storage\IStorage;
use OCP\IL10N; use OCP\IL10N;
use OCP\IServerContainer; use OCP\IServerContainer;
@ -128,7 +125,7 @@ class RuleMatcher implements IRuleMatcher {
list($entity, $subject) = $entityInfo; list($entity, $subject) = $entityInfo;
$checkInstance->setEntitySubject($entity, $subject); $checkInstance->setEntitySubject($entity, $subject);
} }
} else { } else if(!$checkInstance instanceof ICheck) {
// Check is invalid // Check is invalid
throw new \UnexpectedValueException($this->l->t('Check %s is invalid or does not exist', $check['class'])); throw new \UnexpectedValueException($this->l->t('Check %s is invalid or does not exist', $check['class']));
} }

View File

@ -24,9 +24,6 @@ declare(strict_types=1);
namespace OCP\WorkflowEngine; namespace OCP\WorkflowEngine;
use OCP\Files\Storage\IStorage;
/** /**
* Interface IFileCheck * Interface IFileCheck
* *