Stopped using (un)serialize functions but json functions
This commit is contained in:
parent
e0200acc5f
commit
df2262f8be
@ -37,7 +37,7 @@ $action = GETPOST("action");
|
|||||||
$syslogModules = array();
|
$syslogModules = array();
|
||||||
$activeModules = array();
|
$activeModules = array();
|
||||||
|
|
||||||
if (defined('SYSLOG_HANDLERS')) $activeModules = unserialize(SYSLOG_HANDLERS);
|
if (defined('SYSLOG_HANDLERS')) $activeModules = json_decode(SYSLOG_HANDLERS);
|
||||||
|
|
||||||
$dir = dol_buildpath('/core/modules/syslog/');
|
$dir = dol_buildpath('/core/modules/syslog/');
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ if ($action == 'set')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dolibarr_set_const($db, 'SYSLOG_HANDLERS', serialize($activeModules), 'chaine');
|
dolibarr_set_const($db, 'SYSLOG_HANDLERS', json_encode($activeModules), 'chaine');
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -521,7 +521,7 @@ function dol_syslog($message, $level = LOG_INFO)
|
|||||||
else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME'];
|
else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME'];
|
||||||
|
|
||||||
//We load SYSLOG handlers
|
//We load SYSLOG handlers
|
||||||
if (defined('SYSLOG_HANDLERS')) $handlers = unserialize(SYSLOG_HANDLERS);
|
if (defined('SYSLOG_HANDLERS')) $handlers = json_decode(SYSLOG_HANDLERS);
|
||||||
else $handlers = array();
|
else $handlers = array();
|
||||||
|
|
||||||
foreach ($handlers as $handler)
|
foreach ($handlers as $handler)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user