mirror of
https://github.com/friendica/friendica
synced 2024-12-22 08:09:45 +01:00
fix setting array values to config items
This commit is contained in:
parent
2320a3e549
commit
5dad99888d
1 changed files with 1 additions and 3 deletions
|
@ -77,11 +77,9 @@ function get_config($family, $key, $instore = false) {
|
|||
if(! function_exists('set_config')) {
|
||||
function set_config($family,$key,$value) {
|
||||
global $a;
|
||||
|
||||
// manage array value
|
||||
$dbvalue = (is_array($value)?serialize($value):$value);
|
||||
$dbvalue = (is_bool($value) ? intval($value) : $value);
|
||||
|
||||
$dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue);
|
||||
if(get_config($family,$key,true) === false) {
|
||||
$a->config[$family][$key] = $value;
|
||||
$ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
|
||||
|
|
Loading…
Reference in a new issue