fix projet/messaging.php warnings (#31869)

Co-authored-by: Hystepik <lmarcouiller@nltechno.com>
This commit is contained in:
Lucas Marcouiller
2024-11-16 00:15:43 +01:00
committed by GitHub
parent 0cb9fe1241
commit 6f6997a017

View File

@@ -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').' <em>('.$langs->trans('Private').')</em>';
} elseif (isset($histo[$key]['type'])) {
if ($histo[$key]['type'] == 'action') {