Debug v20

This commit is contained in:
Laurent Destailleur 2024-06-16 12:23:12 +02:00
parent 7054e05f86
commit 239b4bcc6e

View file

@ -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 .= '<option value="0">&nbsp;</option>';
foreach ($data as $data_key => $data_value) {
$out .= '<option value="' . $data_key . '"';
@ -1046,7 +1050,7 @@ class FormWebPortal extends Form
if ($type == 'array') {
$value = implode('<br>', $value);
} else {
dol_syslog(__METHOD__ . 'ERROR unexpected type=$type for array value='.((string) json_encode($value)), LOG_ERR);
dol_syslog(__METHOD__ . 'ERROR unexpected type='.$type.' for array value='.((string) json_encode($value)), LOG_ERR);
}
//
// Then the cases where $value is not an array (hence string)