Synchronise API and app rule management.

This commit is contained in:
James Cole
2018-08-05 15:41:13 +02:00
parent 422e80530b
commit 0a89f4000d
2 changed files with 55 additions and 27 deletions

View File

@@ -337,7 +337,10 @@ class FireflyValidator extends Validator
// and finally a "will match everything check":
$classes = app('config')->get('firefly.rule-triggers');
/** @var TriggerInterface $class */
$class = $classes[$triggerType];
$class = $classes[$triggerType] ?? false;
if(false === $class) {
return false;
}
return !$class::willMatchEverything($value);
}