Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix https://github.com/firefly-iii/firefly-iii/issues/8671
James Colef4b066add180
diff --git a/app/TransactionRules/Engine/SearchRuleEngine.php b/app/TransactionRules/Engine/SearchRuleEngine.phpindex 79eed1d4da..e415654509 100644--- a/app/TransactionRules/Engine/SearchRuleEngine.php+++ b/app/TransactionRules/Engine/SearchRuleEngine.php@@ -108,9 +108,13 @@ class SearchRuleEngine implements RuleEngineInterfaceif (false === $ruleTrigger->active) {continue;}+ $contextSearch = $ruleTrigger->trigger_type;+ if(str_starts_with($ruleTrigger->trigger_type, '-')) {+ $contextSearch = substr($ruleTrigger->trigger_type, 1);+ }// if the trigger needs no context, value is different:- $needsContext = (bool)(config(sprintf('search.operators.%s.needs_context', $ruleTrigger->trigger_type)) ?? true);+ $needsContext = (bool)(config(sprintf('search.operators.%s.needs_context', $contextSearch)) ?? true);if (false === $needsContext) {app('log')->debug(sprintf('SearchRuleEngine:: add a rule trigger (no context): %s:true', $ruleTrigger->trigger_type));$searchArray[$ruleTrigger->trigger_type][] = 'true';