2
0
forked from Wavyzz/dolibarr

Fix Phan notices introduced since 30/12/2024

This commit is contained in:
MDW
2025-01-13 20:04:35 +01:00
parent 4707d29f0a
commit 7150af31dc
50 changed files with 407 additions and 142 deletions

View File

@@ -495,6 +495,7 @@ function getEntity($element, $shared = 1, $currentobject = null)
'currentobject' => $currentobject,
'out' => $out
);
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
$reshook = $hookmanager->executeHooks('hookGetEntity', $parameters, $currentobject, $action); // Note that $action and $object may have been modified by some hooks
if (is_numeric($reshook)) {
@@ -11309,6 +11310,7 @@ 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, 'filterorigmodule' => $filterorigmodule);
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
$reshook = $hookmanager->executeHooks('completeTabsHead', $parameters, $object);
if ($reshook > 0) { // Hook ask to replace completely the array
$head = $hookmanager->resArray;