diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-10-29 17:57:53 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2019-10-29 18:03:57 +0100 |
commit | 9c766cf03faa10584255458120d8404ddc05c47d (patch) | |
tree | 0c8a730c041b37067944737c5952efe680845868 | |
parent | 580c8355b284bb068a32f44535707ede3fdfd688 (diff) | |
download | nextcloud-server-9c766cf03faa10584255458120d8404ddc05c47d.tar.gz nextcloud-server-9c766cf03faa10584255458120d8404ddc05c47d.zip |
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>
-rw-r--r-- | apps/workflowengine/lib/Service/RuleMatcher.php | 5 | ||||
-rw-r--r-- | lib/public/WorkflowEngine/IEntityCheck.php | 3 |
2 files changed, 1 insertions, 7 deletions
diff --git a/apps/workflowengine/lib/Service/RuleMatcher.php b/apps/workflowengine/lib/Service/RuleMatcher.php index bcfcd5dd219..95c68b63370 100644 --- a/apps/workflowengine/lib/Service/RuleMatcher.php +++ b/apps/workflowengine/lib/Service/RuleMatcher.php @@ -24,12 +24,9 @@ declare(strict_types=1); namespace OCA\WorkflowEngine\Service; -use OCA\WorkflowEngine\AppInfo\Application; -use OCA\WorkflowEngine\Entity\File; use OCA\WorkflowEngine\Helper\ScopeContext; use OCA\WorkflowEngine\Manager; use OCP\AppFramework\QueryException; -use OCP\Files\Node; use OCP\Files\Storage\IStorage; use OCP\IL10N; use OCP\IServerContainer; @@ -128,7 +125,7 @@ class RuleMatcher implements IRuleMatcher { list($entity, $subject) = $entityInfo; $checkInstance->setEntitySubject($entity, $subject); } - } else { + } else if(!$checkInstance instanceof ICheck) { // Check is invalid throw new \UnexpectedValueException($this->l->t('Check %s is invalid or does not exist', $check['class'])); } diff --git a/lib/public/WorkflowEngine/IEntityCheck.php b/lib/public/WorkflowEngine/IEntityCheck.php index 7a4df0afd5f..d90535b4c99 100644 --- a/lib/public/WorkflowEngine/IEntityCheck.php +++ b/lib/public/WorkflowEngine/IEntityCheck.php @@ -24,9 +24,6 @@ declare(strict_types=1); namespace OCP\WorkflowEngine; - -use OCP\Files\Storage\IStorage; - /** * Interface IFileCheck * |