From 04ca1be08691a777d743d1aae4b2bc389e62fc1c Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Wed, 21 Apr 2021 21:43:56 +0200
Subject: [PATCH] =?UTF-8?q?=C3=89viter=20une=20notice=20php=20sur=20le=20a?=
 =?UTF-8?q?rray=5Fshift?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/inc/filtres_alertes.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ecrire/inc/filtres_alertes.php b/ecrire/inc/filtres_alertes.php
index 08c9b499fc..f22c7a6192 100644
--- a/ecrire/inc/filtres_alertes.php
+++ b/ecrire/inc/filtres_alertes.php
@@ -184,8 +184,8 @@ function message_alerte_ouvrir(string $titre = '', string $class = '', string $r
 		'success',
 		'info',
 	];
-	$type  = array_shift(array_intersect(explode(' ', $class), $types));
-	$type  = $type ?: 'notice';
+	$type = array_intersect(explode(' ', $class), $types);
+	$type  = reset($type) ?: 'notice';
 	$class = trim(str_replace($types, '', $class) . " $type");
 
 	// Role
-- 
GitLab