From 6f68380efe72e0ab45235ae8b3d834e1d529e782 Mon Sep 17 00:00:00 2001 From: mgabriel Date: Tue, 21 Mar 2023 09:22:35 +0100 Subject: [PATCH] Changed $reshook check to be like the Dolibarr documentation. --- htdocs/core/class/html.form.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b1fd401f277..022b2f40914 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3224,10 +3224,10 @@ class Form $parameters = array('objp'=>$objp); $reshook = $hookmanager->executeHooks('constructProductListOption', $parameters); // Note that $action and $object may have been modified by hook - if (!empty($reshook)) { - $opt = $hookmanager->resPrint; - } else { + if (empty($reshook)) { $opt .= $hookmanager->resPrint; + } else { + $opt = $hookmanager->resPrint; } $opt .= "\n";