From e4492da46f87c160ebb61b57193446ac45aa36b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 8 Mar 2023 21:20:56 +0100 Subject: [PATCH] use a fonction to get multidir output --- htdocs/core/lib/functions.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 668c7636926..ee200fa1679 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -75,11 +75,15 @@ if (!function_exists('utf8_decode')) { * Return multidir output for an Dolibarr object * * @param CommonObject $object Dolibarr common object - * @return string + * @since Dolibarr V18 + * @return string|void */ -function getMultiDirOutput($object) : string +function getMultidirOutput($object) { global $conf; + if (!is_object($object)) { + return; + } $module = $object->element; return $conf->$module->multidir_output[$object->entity]; }