From a8ccc0ab0b0cd3b3ec716f96b74ceef5db9ec2a0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 28 Jan 2013 12:36:15 +0100 Subject: [PATCH] Fix: loghandler loaded twice. --- htdocs/core/class/conf.class.php | 2 +- htdocs/install/inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;