';
diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php
index 91a3cdb9b44..58fb5f632bf 100644
--- a/htdocs/core/modules/syslog/mod_syslog_syslog.php
+++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php
@@ -16,7 +16,7 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
*/
public function getName()
{
- return 'Syslog';
+ return 'Syslogd';
}
/**
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 994683af906..adb53e56edf 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1600,7 +1600,7 @@ SyslogLevel=Level
SyslogFilename=File name and path
YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file.
ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant
-OnlyWindowsLOG_USER=Windows only supports LOG_USER
+OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported
CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug)
SyslogFileNumberOfSaves=Number of backup logs to keep
ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index be379afd441..940aabee808 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -144,7 +144,9 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
$errormessage = 'Access refused to '.$ip.' by SQL or Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')';
print $errormessage;
// Add entry into error log
- error_log($errormessage);
+ if (function_exists('error_log')) {
+ error_log($errormessage);
+ }
// TODO Add entry into security audit table
exit;
}