From 6e33d1e2b1c3a2ff5ed1993cd8ba71ddc4efed94 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 16 Nov 2022 10:48:25 +0100 Subject: [PATCH 1/2] FIX merge errors on mailing card --- htdocs/comm/mailing/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index b91bc866d9a..04eac2b5fbf 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -508,6 +508,7 @@ if (empty($reshook)) { exit; } $mesgs[] = $object->error; + $mesgs = array_merge($mesgs, $object->errors); } setEventMessages(null, $mesgs, 'errors'); @@ -595,6 +596,7 @@ if (empty($reshook)) { exit; } $mesgs[] = $object->error; + $mesgs = array_merge($mesgs, $object->errors); } setEventMessages($mesg, $mesgs, 'errors'); From 10154cc357f812af8658f155a85d054a0e9a6629 Mon Sep 17 00:00:00 2001 From: VESSILLER Date: Wed, 16 Nov 2022 11:05:39 +0100 Subject: [PATCH 2/2] FIX remove not initialized variable --- htdocs/comm/mailing/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 04eac2b5fbf..b8bd18f56c2 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -511,7 +511,7 @@ if (empty($reshook)) { $mesgs = array_merge($mesgs, $object->errors); } - setEventMessages(null, $mesgs, 'errors'); + setEventMessages('', $mesgs, 'errors'); $action = "create"; } @@ -599,7 +599,7 @@ if (empty($reshook)) { $mesgs = array_merge($mesgs, $object->errors); } - setEventMessages($mesg, $mesgs, 'errors'); + setEventMessages('', $mesgs, 'errors'); $action = "edit"; } else { $action = "edit";