Fix: Deprecated since php 5.3.0, syslog variables no longer need to be initialized

This commit is contained in:
Regis Houssin 2009-10-19 19:10:51 +00:00
parent f66b2f5316
commit cca3b041a5
3 changed files with 8 additions and 3 deletions

View File

@ -46,7 +46,10 @@ if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
// Definition des constantes syslog
if (function_exists("define_syslog_variables"))
{
define_syslog_variables();
if (version_compare(PHP_VERSION, '5.3.0', '<'))
{
define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
}
}
else
{

View File

@ -293,7 +293,6 @@ function dol_syslog($message, $level=LOG_INFO)
{
$facility = LOG_USER;
//define_syslog_variables(); already defined in master.inc.php
if (defined("SYSLOG_FACILITY") && SYSLOG_FACILITY)
{
// Exemple: SYSLOG_FACILITY vaut LOG_USER qui vaut 8. On a besoin de 8 dans $facility.

View File

@ -44,7 +44,10 @@ if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
// Definition des constantes syslog
if (function_exists("define_syslog_variables"))
{
define_syslog_variables();
if (version_compare(PHP_VERSION, '5.3.0', '<'))
{
define_syslog_variables(); // Deprecated since php 5.3.0, syslog variables no longer need to be initialized
}
}
else
{