From c76ab41c91926ee168fd27a3e33a84e11ef03e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20France?= Date: Thu, 21 Mar 2024 21:52:02 +0100 Subject: [PATCH] fix warnings with syslog checkconfiguration --- htdocs/core/modules/syslog/logHandler.php | 4 ++-- htdocs/core/modules/syslog/logHandlerInterface.php | 4 +++- htdocs/core/modules/syslog/mod_syslog_syslog.php | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/modules/syslog/logHandler.php b/htdocs/core/modules/syslog/logHandler.php index 1672a683cb1..e7ec4dbc567 100644 --- a/htdocs/core/modules/syslog/logHandler.php +++ b/htdocs/core/modules/syslog/logHandler.php @@ -87,11 +87,11 @@ class LogHandler * It will be called after setting the configuration. * The function returns an array with error messages * - * @return array + * @return bool */ public function checkConfiguration() { - return array(); + return true; } /** diff --git a/htdocs/core/modules/syslog/logHandlerInterface.php b/htdocs/core/modules/syslog/logHandlerInterface.php index 15ab436f4fa..2613d50f755 100644 --- a/htdocs/core/modules/syslog/logHandlerInterface.php +++ b/htdocs/core/modules/syslog/logHandlerInterface.php @@ -1,4 +1,6 @@ + */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -79,7 +81,7 @@ interface LogHandlerInterface /** * Output log content * - * @param string $content Content to log + * @param array $content Content to log * @return void */ public function export($content); diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php index b2ccf4f997e..8d1457fa2ec 100644 --- a/htdocs/core/modules/syslog/mod_syslog_syslog.php +++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php @@ -83,7 +83,7 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface */ public function checkConfiguration() { - global $conf, $langs; + global $langs; $facility = constant(getDolGlobalString('SYSLOG_FACILITY'));