From 0ccc9bc7d15eb02a929476a60be148977d251144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Cendrier?= <81741011+altairis-noe@users.noreply.github.com> Date: Tue, 21 May 2024 15:54:49 +0200 Subject: [PATCH] =?UTF-8?q?FIX:=20php=20warning=20if=20cookie=20doesn?= =?UTF-8?q?=E2=80=99t=20exist=20(#29723)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/core/class/html.formmargin.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 688f55aa0cb..9dc3f9b3780 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -227,7 +227,7 @@ class FormMargin } elseif (empty($reshook)) { if (getDolGlobalString('MARGIN_ADD_SHOWHIDE_BUTTON')) { print $langs->trans('ShowMarginInfos') . ' '; - $hidemargininfos = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']); // Clean cookie + $hidemargininfos = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']) ?? ''; // Clean cookie print '' . img_picto($langs->trans("Disabled"), 'switch_off') . ''; print '' . img_picto($langs->trans("Enabled"), 'switch_on') . '';