From ac4ee0172336b379c4074df1f3895813d417164d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Tue, 16 Oct 2012 13:39:23 +0200 Subject: [PATCH] mod_syslog_syslog class shouldn't be active if openlog is not available --- htdocs/core/modules/syslog/mod_syslog_syslog.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index ad83bff2803..d2befc42844 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -35,6 +35,12 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface */ public function isActive() { + // This function does not exists on some ISP (Ex: Free in France) + if (!function_exists('openlog')) + { + return false; + } + return true; } @@ -85,12 +91,6 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface */ public function export($content) { - // This function does not exists on some ISP (Ex: Free in France) - if (!function_exists('openlog')) - { - throw new Exception('Function openlog is not available in this server'); - } - if (defined("SYSLOG_FACILITY") && constant("SYSLOG_FACILITY")) { if (constant(constant('SYSLOG_FACILITY')))