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:
parent
580c8355b2
commit
9c766cf03f
|
@ -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']));
|
||||
}
|
||||
|
|
|
@ -24,9 +24,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace OCP\WorkflowEngine;
|
||||
|
||||
|
||||
use OCP\Files\Storage\IStorage;
|
||||
|
||||
/**
|
||||
* Interface IFileCheck
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue