Fix issue with rule repository validation

This commit is contained in:
James Cole 2023-01-28 06:59:26 +01:00
parent 81c37b3349
commit a925e1aa02
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80

View File

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