]> git.mxchange.org Git - friendica.git/commitdiff
Fix Config and PConfig ::get() on new keys
authorFabrixxm <fabrix.xm@gmail.com>
Mon, 13 Jun 2016 08:28:40 +0000 (10:28 +0200)
committerFabrixxm <fabrix.xm@gmail.com>
Mon, 13 Jun 2016 08:28:40 +0000 (10:28 +0200)
include/Core/Config.php
include/Core/PConfig.php

index ff35418849b428d4705ea89e25cf8780b37ed3d3..8e387ca6f0475f06028ce8b9e05b2d6b3dee17db 100644 (file)
@@ -172,7 +172,7 @@ class Config {
                // manage array value
                $dbvalue = (is_array($value)?serialize($value):$value);
                $dbvalue = (is_bool($dbvalue) ? intval($dbvalue) : $dbvalue);
-               if(self::get($family,$key,null,true) === false) {
+               if(is_null(self::get($family,$key,null,true))) {
                        $a->config[$family][$key] = $value;
                        $ret = q("INSERT INTO `config` ( `cat`, `k`, `v` ) VALUES ( '%s', '%s', '%s' ) ",
                                dbesc($family),
index c47559d0ebd257e637fcc02a6bdc236e7bcf1b05..ab351ef2c230dceca3e7a44aa103ae273b47421a 100644 (file)
@@ -161,7 +161,7 @@ class PConfig {
                // manage array value
                $dbvalue = (is_array($value)?serialize($value):$value);
 
-               if(self::get($uid,$family,$key,null, true) === false) {
+               if(is_null(self::get($uid,$family,$key,null, true))) {
                        $a->config[$uid][$family][$key] = $value;
                        $ret = q("INSERT INTO `pconfig` ( `uid`, `cat`, `k`, `v` ) VALUES ( %d, '%s', '%s', '%s' ) ",
                                intval($uid),