Skip to content
Snippets Groups Projects
Commit 2ffa7366 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Better error management

parent 8b2a17bb
No related branches found
No related tags found
No related merge requests found
...@@ -52,13 +52,15 @@ if ( ($action == 'update' && empty($_POST["cancel"])) ...@@ -52,13 +52,15 @@ if ( ($action == 'update' && empty($_POST["cancel"]))
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
$tmparray=getCountry(GETPOST('country_id','int'),'all',$db,$langs,0); $tmparray=getCountry(GETPOST('country_id','int'),'all',$db,$langs,0);
if (! empty($tmparray['id']))
$mysoc->country_id=GETPOST('country_id','int'); {
$mysoc->country_id =$tmparray['id'];
$mysoc->country_code =$tmparray['code']; $mysoc->country_code =$tmparray['code'];
$mysoc->country_label=$tmparray['label']; $mysoc->country_label=$tmparray['label'];
$s=$mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label; $s=$mysoc->country_id.':'.$mysoc->country_code.':'.$mysoc->country_label;
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $s,'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_PAYS", $s,'chaine',0,'',$conf->entity);
}
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_NOM",$_POST["nom"],'chaine',0,'',$conf->entity);
dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_INFO_SOCIETE_ADRESSE",$_POST["address"],'chaine',0,'',$conf->entity);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment