From 504a8b8eaf4fb7be16798142e99940dfbcc35a81 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 8 Jan 2025 16:04:06 +0100 Subject: [PATCH] Fix some modulebuilder backward compatibility --- htdocs/modulebuilder/template/myobject_card.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index bcd37702167..bcaf7d9b74b 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -629,12 +629,15 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Show links to link elements $tmparray = $form->showLinkToObjectBlock($object, array(), array('myobject'), 1); - $linktoelem = $tmparray['linktoelem']; - $htmltoenteralink = $tmparray['htmltoenteralink']; - print $htmltoenteralink; - - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - + if (is_array($tmparray)) { + $linktoelem = $tmparray['linktoelem']; + $htmltoenteralink = $tmparray['htmltoenteralink']; + print $htmltoenteralink; + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + } else { + // backward compatibility + $somethingshown = $form->showLinkedObjectBlock($object, $tmparray); + } print '
';