fix mulitple module using completeTabsHead

complete $template['head'] in module and return 0 to not replace instead return $head and replace
This commit is contained in:
Frédéric FRANCE 2021-05-06 22:28:03 +02:00 committed by GitHub
parent e791f9b863
commit a56dc4ff65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8385,12 +8385,12 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
// No need to make a return $head. Var is modified as a reference
if (!empty($hookmanager)) {
$parameters = array('object' => $object, 'mode' => $mode, 'head' => $head);
$parameters = array('object' => $object, 'mode' => $mode, 'head' => &$head);
$reshook = $hookmanager->executeHooks('completeTabsHead', $parameters);
if ($reshook > 0) {
$head = $hookmanager->resArray;
$h = count($head);
}
$h = count($head);
}
}