diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0b8861d2cea..04e1b9a0554 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -14696,9 +14696,9 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, } $libelle = ''; - if (preg_match('/^TICKET_MSG/', $actionstatic->code)) { + if (!empty($actionstatic->code) && preg_match('/^TICKET_MSG/', $actionstatic->code)) { $out .= $langs->trans('TicketNewMessage'); - } elseif (preg_match('/^TICKET_MSG_PRIVATE/', $actionstatic->code)) { + } elseif (!empty($actionstatic->code) && preg_match('/^TICKET_MSG_PRIVATE/', $actionstatic->code)) { $out .= $langs->trans('TicketNewMessage').' ('.$langs->trans('Private').')'; } elseif (isset($histo[$key]['type'])) { if ($histo[$key]['type'] == 'action') {