]> git.mxchange.org Git - friendica.git/blobdiff - include/Core/PConfig.php
Coding convention applied:
[friendica.git] / include / Core / PConfig.php
index 351f63e0043b1f5daf286c2187d9857e3a72d178..49b69a1f7a2d814de21e87e9e6ba2ca2bd4fa430 100644 (file)
@@ -1,5 +1,8 @@
 <?php
 namespace Friendica\Core;
+
+use dbm;
+
 /**
  * @file include/Core/PConfig.php
  * @brief contains the class with methods for the management
@@ -33,7 +36,7 @@ class PConfig {
                        dbesc($family),
                        intval($uid)
                );
-               if (count($r)) {
+               if (dbm::is_result($r)) {
                        foreach ($r as $rr) {
                                $k = $rr['k'];
                                $a->config[$uid][$family][$k] = $rr['v'];
@@ -89,7 +92,7 @@ class PConfig {
                        dbesc($key)
                );
 
-               if (count($ret)) {
+               if (dbm::is_result($ret)) {
                        $val = (preg_match("|^a:[0-9]+:{.*}$|s", $ret[0]['v'])?unserialize( $ret[0]['v']):$ret[0]['v']);
                        $a->config[$uid][$family][$key] = $val;