From 7cb02f77d173da1b8b6302ccdfd9029cd17be248 Mon Sep 17 00:00:00 2001
From: "florian.azizian" <florian.azizian@maarch.org>
Date: Mon, 18 Mar 2019 11:16:39 +0100
Subject: [PATCH] php 7.3 notes in mail

---
 modules/sendmail/mail_form.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/modules/sendmail/mail_form.php b/modules/sendmail/mail_form.php
index 7b329d0b98c..0b5c563d392 100755
--- a/modules/sendmail/mail_form.php
+++ b/modules/sendmail/mail_form.php
@@ -894,7 +894,11 @@ if ($mode == 'add') {
                             .'" title="'.$note
                             .'"><input type="checkbox" id="note_'.$id.'" name="notes[]"';
 
-                        (in_array($id, $emailArray['notes'])) ? $checked = ' checked="checked"' : $checked = '';
+                        if (!empty($emailArray['notes']) && in_array($id, $emailArray['notes'])) {
+                            $checked = ' checked="checked"' ;
+                        } else {
+                            $checked = '';
+                        }
 
                         $content .= ' '.$checked
                             .' class="check" value="'
@@ -1291,7 +1295,11 @@ if ($mode == 'add') {
                             .'" title="'.$note
                             .'"><input type="checkbox" disabled="disabled" id="note_'.$id.'" name="notes[]"';
 
-                        (in_array($id, $emailArray['notes'])) ? $checked = ' checked="checked"' : $checked = '';
+                        if (!empty($emailArray['notes']) && in_array($id, $emailArray['notes'])) {
+                            $checked = ' checked="checked"' ;
+                        } else {
+                            $checked = '';
+                        }
 
                         $content .= ' '.$checked
                             .' class="check" value="'
-- 
GitLab