Fix warning during install

This commit is contained in:
Laurent Destailleur 2017-04-24 05:20:45 +02:00
parent 215ef30abe
commit 10e2b128d1

View File

@ -104,8 +104,10 @@ class mod_syslog_file extends LogHandler implements LogHandlerInterface
private function getFilename($suffixinfilename='')
{
global $conf;
if (! empty($conf->global->SYSLOG_FILE)) $tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE);
else $tmp='dolibarr.log';
if (empty($conf->global->SYSLOG_FILE)) $tmp=DOL_DATA_ROOT.'/dolibarr.log';
else $tmp=str_replace('DOL_DATA_ROOT', DOL_DATA_ROOT, $conf->global->SYSLOG_FILE);
return $suffixinfilename?preg_replace('/\.log$/i', $suffixinfilename.'.log', $tmp):$tmp;
}