From 5f35bc5ee6b76f22bc27cd45564421c142735bfc Mon Sep 17 00:00:00 2001 From: Maxco10 Date: Wed, 25 Oct 2023 11:15:20 +0200 Subject: [PATCH] Added check on title and improved the check for description field Signed-off-by: Maxco10 --- app/Repositories/Rule/RuleRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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();