From 239b4bcc6e131b4054c34c182b2ee75c2ef4e479 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 16 Jun 2024 12:23:12 +0200 Subject: [PATCH] Debug v20 --- htdocs/webportal/class/html.formwebportal.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/webportal/class/html.formwebportal.class.php b/htdocs/webportal/class/html.formwebportal.class.php index a7fdcd147c4..5d68dff0bc5 100644 --- a/htdocs/webportal/class/html.formwebportal.class.php +++ b/htdocs/webportal/class/html.formwebportal.class.php @@ -910,7 +910,11 @@ class FormWebPortal extends Form } } else { require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; - $data = $this->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1); + $categorytype = $InfoFieldList[5]; + if (is_numeric($categorytype)) { + $categorytype = Categorie::$MAP_ID_TO_CODE[$categorytype]; // For backward compatibility + } + $data = $this->select_all_categories($categorytype, '', 'parent', 64, $InfoFieldList[6], 1, 1); $out .= ''; foreach ($data as $data_key => $data_value) { $out .= '