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

Fix: Try/catch

parent 13929bc4
No related branches found
No related tags found
No related merge requests found
......@@ -204,7 +204,16 @@ class Conf
// If you can't set timezone of your PHP, set this constant. Better is to set it to UTC.
// In future, this constant will be forced to 'UTC' so PHP server timezone will not have effect anymore.
//$this->global->MAIN_SERVER_TZ='Europe/Paris';
if (! empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto') date_default_timezone_set($this->global->MAIN_SERVER_TZ);
if (! empty($this->global->MAIN_SERVER_TZ) && $this->global->MAIN_SERVER_TZ != 'auto')
{
try {
date_default_timezone_set($this->global->MAIN_SERVER_TZ);
}
catch(Exception $e)
{
dol_syslog("Error: Bad value for parameter MAIN_SERVER_TZ=".$this->global->MAIN_SERVER_TZ, LOG_ERR);
}
}
// Object $mc
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
......@@ -243,7 +252,7 @@ class Conf
if ($conf->global->FACTURE_TVAOPTION != "franchise") $conf->global->FACTURE_TVAOPTION=1;
else $conf->global->FACTURE_TVAOPTION=0;
}
// Variable globales LDAP
if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME='';
if (! isset($this->global->LDAP_KEY_USERS)) $this->global->LDAP_KEY_USERS=$this->global->LDAP_FIELD_FULLNAME;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment