forked from Wavyzz/dolibarr
Fix Phan notices introduced since 30/12/2024
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
@@ -14,7 +15,7 @@
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021-2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2023-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -454,6 +455,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t
|
||||
if (is_object($hookmanager)) {
|
||||
$parameters = array('sourcecompany' => &$sourcecompany, 'targetcompany' => &$targetcompany, 'targetcontact' => &$targetcontact, 'outputlangs' => $outputlangs, 'mode' => $mode, 'usecontact' => $usecontact);
|
||||
$action = '';
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('pdf_build_address', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$stringaddress .= $hookmanager->resPrint;
|
||||
}
|
||||
@@ -2678,7 +2680,7 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
||||
$reshook = $hookmanager->executeHooks('pdf_getLinkedObjects', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook)) {
|
||||
$linkedobjects = array_replace($linkedobjects, $hookmanager->resArray); // array_replace is used to preserve keys
|
||||
} elseif ($reshook>0) {
|
||||
} elseif ($reshook > 0) {
|
||||
// The array must be reinserted even if it is empty because clearing the array could be one of the actions performed by the hook.
|
||||
$linkedobjects = $hookmanager->resArray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user