From: Michael Date: Wed, 9 Aug 2017 06:16:19 +0000 (+0000) Subject: Works now X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=64718b53d1733df0dcd758fb50cf5b215ccc0832;p=friendica.git Works now --- diff --git a/src/Core/Config.php b/src/Core/Config.php index c046153133..fbb79bc5b1 100644 --- a/src/Core/Config.php +++ b/src/Core/Config.php @@ -98,7 +98,7 @@ class Config { } $ret = dba::select('config', array('v'), array('cat' => $family, 'k' => $key), - array("order" => array("cat", "k"), 'limit' => 1)); + array("order" => array("cat", "k"), 'limit' => 1)); if (dbm::is_result($ret)) { // manage array value $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']); @@ -205,6 +205,7 @@ class Config { } $ret = dba::delete('config', array('cat' => $family, 'k' => $key)); + return $ret; } } diff --git a/src/Core/PConfig.php b/src/Core/PConfig.php index 6408b56ff6..4b43d969a2 100644 --- a/src/Core/PConfig.php +++ b/src/Core/PConfig.php @@ -92,7 +92,7 @@ class PConfig { $ret = dba::select('pconfig', array('v'), array('uid' => $uid, 'cat' => $family, 'k' => $key), array("order" => array('uid', 'cat', 'k'), 'limit' => 1)); if (dbm::is_result($ret)) { - $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v']) ? unserialize($ret[0]['v']) : $ret[0]['v']); + $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret['v']) ? unserialize($ret['v']) : $ret['v']); $a->config[$uid][$family][$key] = $val; self::$in_db[$uid][$family][$key] = true;