X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconfig.php;h=4cff38090c2e5bdd585de562d81fa1c5bb7a67f7;hb=c43a03e21bcd12b24be8a59741ec6591c1f651d7;hp=92694f51932c3d9f2358b7b6778dc1af1a403d86;hpb=7f2070ca91aca9e92f3ac4c5b714742c6f9ecc3b;p=friendica.git diff --git a/include/config.php b/include/config.php index 92694f5193..4cff38090c 100644 --- a/include/config.php +++ b/include/config.php @@ -80,6 +80,7 @@ function set_config($family,$key,$value) { // manage array value $dbvalue = (is_array($value)?serialize($value):$value); + $dbvalue = (is_bool($value) ? intval($value) : $value); if(get_config($family,$key,true) === false) { $a->config[$family][$key] = $value; @@ -162,7 +163,7 @@ function del_config($family,$key) { if(x($a->config[$family],$key)) unset($a->config[$family][$key]); $ret = q("DELETE FROM `config` WHERE `cat` = '%s' AND `k` = '%s' LIMIT 1", - dbesc($cat), + dbesc($family), dbesc($key) ); return $ret;