Stopped using (un)serialize functions but json functions

This commit is contained in:
Marcos García 2012-10-16 12:18:05 +02:00
parent e0200acc5f
commit df2262f8be
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ $action = GETPOST("action");
$syslogModules = 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/');
@ -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)
{

View File

@ -521,7 +521,7 @@ function dol_syslog($message, $level = LOG_INFO)
else if (! empty($_SERVER['LOGNAME'])) $data['ip'] = '???@'.$_SERVER['LOGNAME'];
//We load SYSLOG handlers
if (defined('SYSLOG_HANDLERS')) $handlers = unserialize(SYSLOG_HANDLERS);
if (defined('SYSLOG_HANDLERS')) $handlers = json_decode(SYSLOG_HANDLERS);
else $handlers = array();
foreach ($handlers as $handler)