]> git.mxchange.org Git - friendica.git/blobdiff - include/Core/Config.php
Coding convention applied:
[friendica.git] / include / Core / Config.php
index 0d29c99561cfa1b5ba4a9555979e1d3402ecf5b4..523572886457edb82971cd645ceb6ee42e03cb28 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 namespace Friendica\Core;
+
+use dbm;
+
 /**
  * @file include/Core/Config.php
  *
@@ -33,7 +36,7 @@ class Config {
                $a = get_app();
 
                $r = q("SELECT `v`, `k` FROM `config` WHERE `cat` = '%s' ORDER BY `cat`, `k`, `id`", dbesc($family));
-               if (count($r)) {
+               if (dbm::is_result($r)) {
                        foreach ($r as $rr) {
                                $k = $rr['k'];
                                if ($family === 'config') {
@@ -94,7 +97,7 @@ class Config {
                        dbesc($family),
                        dbesc($key)
                );
-               if (count($ret)) {
+               if (dbm::is_result($ret)) {
                        // manage array value
                        $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
                        $a->config[$family][$key] = $val;