Merge pull request #6940 from firefly-iii/fix-rule-validation

Fix issue with rule repository validation
This commit is contained in:
James Cole
2023-01-29 07:02:20 +01:00
committed by GitHub

View File

@@ -426,7 +426,7 @@ class RuleRepository implements RuleRepositoryInterface
$stopProcessing = $trigger['stop_processing'] ?? false;
$active = $trigger['active'] ?? true;
$type = $trigger['type'];
if (true === $trigger['prohibited']) {
if (true === ($trigger['prohibited'] ?? false) && !str_starts_with($type, '-')) {
$type = sprintf('-%s', $type);
}