diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 2d9fb472407..e456effe66e 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -466,7 +466,7 @@ class Conf throw new Exception('Log handler does not extend LogHandlerInterface'); } - $this->loghandlers[]=$loghandlerinstance; + if (empty($conf->loghandlers[$handler])) $this->loghandlers[$handler]=$loghandlerinstance; } } } diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index f078f7a1802..12c58371b29 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -228,7 +228,7 @@ foreach ($handlers as $handler) throw new Exception('Log handler does not extend LogHandlerInterface'); } - $conf->loghandlers[]=$loghandlerinstance; + if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler]=$loghandlerinstance; } // Removed magic_quotes @@ -331,7 +331,7 @@ function conf($dolibarr_main_document_root) throw new Exception('Log handler does not extend LogHandlerInterface'); } - $conf->loghandlers[]=$loghandlerinstance; + if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler]=$loghandlerinstance; } return 1;