]> git.mxchange.org Git - friendica.git/commitdiff
Works now
authorMichael <heluecht@pirati.ca>
Wed, 9 Aug 2017 06:16:19 +0000 (06:16 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 9 Aug 2017 06:16:19 +0000 (06:16 +0000)
src/Core/Config.php
src/Core/PConfig.php

index c0461531338a61e4f87502a0c5519d84e571ada9..fbb79bc5b1bd72d6bff316c2970f0f0abe59cf69 100644 (file)
@@ -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;
        }
 }
index 6408b56ff6d3905e760c38461c24769f3246b17c..4b43d969a27fbfa076cdde5e3d20fdaf89016f50 100644 (file)
@@ -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;