From 956cea11674f36c8079d03b6277734f0221bb032 Mon Sep 17 00:00:00 2001 From: John BOTELLA <68917336+thersane-john@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:24:57 +0100 Subject: [PATCH] fix missing concat --- htdocs/core/lib/pdf.lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 5358fa5af52..92f2c55aa73 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -2619,7 +2619,9 @@ function pdf_getLinkedObjects(&$object, $outputlangs) $parameters = array('linkedobjects' => $linkedobjects, 'outputlangs' => $outputlangs); $action = ''; $reshook = $hookmanager->executeHooks('pdf_getLinkedObjects', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook>0) { + if (empty($reshook)) { + $linkedobjects = array_replace($linkedobjects, $hookmanager->resArray); // array_replace is used to preserve keys + } 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; }