From 9d6efde9357d5025745206730651797fb4615862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 7 Apr 2016 17:12:06 +0200 Subject: [PATCH] Prevent sentry logging error with 3.9 update Since we don't ship the required libraries anymore, if the module had been enabled before upgrade, the code was failing making Dolibarr totally unusable. Mitigated the issue by disabling sentry logging if the required libraries are unavailable. --- htdocs/core/modules/syslog/mod_syslog_sentry.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/modules/syslog/mod_syslog_sentry.php b/htdocs/core/modules/syslog/mod_syslog_sentry.php index afea1a36375..a159a5edf2f 100644 --- a/htdocs/core/modules/syslog/mod_syslog_sentry.php +++ b/htdocs/core/modules/syslog/mod_syslog_sentry.php @@ -145,6 +145,10 @@ class mod_syslog_sentry extends LogHandler implements LogHandlerInterface */ public function export($content) { + if (! $this->isActive()) { + return; + } + global $conf; $dsn = $conf->global->SYSLOG_SENTRY_DSN; $client = new Raven_Client(