Skip to content

Firefly III: a personal finances manager

Added check on title and improved the check for description field

Maxco105f35bc5ee6b7
diff --git a/app/Repositories/Rule/RuleRepository.php b/app/Repositories/Rule/RuleRepository.php
index 3c19b3aac5..9bd730682e 100644
--- a/app/Repositories/Rule/RuleRepository.php
+++ b/app/Repositories/Rule/RuleRepository.php
@@ -288,8 +288,8 @@ class RuleRepository implements RuleRepositoryInterface
$rule->active = array_key_exists('active', $data) ? $data['active'] : true;
$rule->strict = array_key_exists('strict', $data) ? $data['strict'] : false;
$rule->stop_processing = array_key_exists('stop_processing', $data) ? $data['stop_processing'] : false;
- $rule->title = $data['title'];
- $rule->description = $data['description'];
+ $rule->title = array_key_exists('title', $data) ? $data['title'] : "untitle";
+ $rule->description = array_key_exists('description', $data) ? $data['description'] : "";
$rule->save();
$rule->refresh();