From 468b8bcab38e0b0ec6bc5f8226bc0758c776c405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20NASSIET?= Date: Thu, 12 Jan 2023 19:26:55 +0100 Subject: [PATCH] correction bug si pas reponse sur le hook --- htdocs/user/param_ihm.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 81ecdca8e73..2f8f4ae24ad 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -216,11 +216,13 @@ if (isModEnabled('ticket')) { } // Hook for insertion new items in the List of possible landing pages -$reshook = $hookmanager->executeHooks('addToLandingPageList', $tmparray, $object); -if ($reshook < 0) { - setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -} elseif ($reshook == 0) { - $tmparray=$hookmanager->resArray; +$reshook = $hookmanager->executeHooks('addToLandingPageList',$tmparray,$object); +if (!empty($reshook)) { + if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } else if ($reshook == 0) { + $tmparray=$hookmanager->resArray; + } } $head = user_prepare_head($object);