From c8055715447465066a6a2855fb0958d08d0b8277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Thu, 12 Jan 2023 19:35:49 +0100 Subject: [PATCH] correction bug si pas reponse sur le hook --- htdocs/user/param_ihm.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 2f8f4ae24ad..4ee2c318f5e 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -217,14 +217,15 @@ if (isModEnabled('ticket')) { // Hook for insertion new items in the List of possible landing pages $reshook = $hookmanager->executeHooks('addToLandingPageList',$tmparray,$object); -if (!empty($reshook)) { - if ($reshook < 0) { - setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } else if ($reshook == 0) { +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} else if ($reshook === 0) { + if (count($hookmanager->resArray)!==0) { $tmparray=$hookmanager->resArray; } } + $head = user_prepare_head($object); $title = $langs->trans("User");