From b971efb0626915b7ba10804c59e1fe3debee2ebd Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Tue, 14 Dec 2021 12:25:43 +0100 Subject: [PATCH] FIX : marginInfos array should be used by reference to allow to update it with a hook without draw again margin table --- 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 d578f19ff2f..f39680d1fe3 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -213,7 +213,7 @@ class FormMargin $marginInfo = $this->getMarginInfosArray($object, $force_price); - $parameters=array('marginInfo'=>$marginInfo); + $parameters=array('marginInfo'=>&$marginInfo); $reshook = $hookmanager->executeHooks('displayMarginInfos', $parameters, $object, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');