Fix: Try/catch
This commit is contained in:
parent
13929bc46f
commit
b586b74c79
@ -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.
|
// 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.
|
// 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';
|
//$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
|
// Object $mc
|
||||||
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
if (! defined('NOREQUIREMC') && ! empty($this->multicompany->enabled))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user