From 5911a67a3118c19487b76ac916f7ff0c337089d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 31 Jul 2024 15:34:54 +0200 Subject: [PATCH] Debug v21 --- htdocs/societe/admin/societe.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/societe/admin/societe.php b/htdocs/societe/admin/societe.php index c220073cb88..59380b3b524 100644 --- a/htdocs/societe/admin/societe.php +++ b/htdocs/societe/admin/societe.php @@ -69,7 +69,7 @@ if ($action == 'setcodecompta') { } if ($action == 'updateoptions') { - if (GETPOST('COMPANY_USE_SEARCH_TO_SELECT')) { + if (GETPOSTISSET('COMPANY_USE_SEARCH_TO_SELECT')) { $companysearch = GETPOST('activate_COMPANY_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "COMPANY_USE_SEARCH_TO_SELECT", $companysearch, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -82,7 +82,7 @@ if ($action == 'updateoptions') { } } - if (GETPOST('CONTACT_USE_SEARCH_TO_SELECT')) { + if (GETPOSTISSET('CONTACT_USE_SEARCH_TO_SELECT')) { $contactsearch = GETPOST('activate_CONTACT_USE_SEARCH_TO_SELECT', 'alpha'); $res = dolibarr_set_const($db, "CONTACT_USE_SEARCH_TO_SELECT", $contactsearch, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -95,7 +95,7 @@ if ($action == 'updateoptions') { } } - if (GETPOST('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { + if (GETPOSTISSET('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) { $customertypedefault = GETPOSTINT('defaultcustomertype'); $res = dolibarr_set_const($db, "THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT", $customertypedefault, 'chaine', 0, '', $conf->entity); if (!($res > 0)) { @@ -108,8 +108,8 @@ if ($action == 'updateoptions') { } } - if (GETPOST('CONTACTS_DEFAULT_ROLES')) { - $rolessearch = GETPOST('activate_CONTACTS_DEFAULT_ROLES', 'array'); + if (GETPOSTISARRAY('CONTACTS_DEFAULT_ROLES')) { + $rolessearch = GETPOST('activate_CONTACTS_DEFAULT_ROLES', 'array:aZ09'); $res = dolibarr_set_const($db, "CONTACTS_DEFAULT_ROLES", implode(',', $rolessearch), 'chaine', 0, '', $conf->entity); if (!($res > 0)) { $error++;