Skip to content

Firefly III: a personal finances manager

Merge branch 'feature/test-triggers' of github.com:roberthorlings/firefly-iii into feature/test-triggers

Robert Horlings2eb7d8ba91b8
diff --cc app/Rules/Processor.php
index 645ef47e68,b8a53664fd..e60e30f024
--- a/app/Rules/Processor.php
+++ b/app/Rules/Processor.php
@@@ -113,8 -119,14 +119,14 @@@ class Processo
* @var RuleAction $action
*/
foreach ($this->rule->ruleActions()->orderBy('order', 'ASC')->get() as $action) {
+ $type = $action->action_type;
+ $class = $this->actionTypes[$type];
+ Log::debug('Action #' . $action->id . ' for rule #' . $action->rule_id . ' (' . $type . ')');
+ if (!class_exists($class)) {
+ abort(500, 'Could not instantiate class for rule action type "' . $type . '" (' . $class . ').');
+ }
/** @var ActionInterface $actionClass */
- $actionClass = new $class($action, $this->journal);
+ $actionClass = ActionFactory::getAction($action, $this->journal);
$actionClass->act();
if ($action->stop_processing) {
break;