From 0804ebe08a00eb1690505d3299e95a008548f28b Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Thu, 14 Aug 2025 00:14:04 +0200 Subject: [PATCH] Fix type --- htdocs/core/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index b98463057eb..cd810b12208 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -8070,7 +8070,7 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = ' // Here, $object->id, $object->ref and $modulepart are required. if (in_array($modulepart, array('societe', 'thirdparty')) && $object instanceOf Societe) { // Special case for thirdparty, where the ref is a company name that is not unique so path on disk is using the ID instead of the ref - $path = dol_sanitizeFileName($object->id); + $path = dol_sanitizeFileName((string) $object->id); } else { $path = dol_sanitizeFileName(empty($object->ref) ? (string) ((is_object($object) && property_exists($object, 'id')) ? $object->id : '') : $object->ref); }