]> git.mxchange.org Git - friendica.git/blobdiff - mod/poco.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / poco.php
index 1ec5b2d4e1b07e1c91157cfadc31c28e59c30d14..94dac77eef824932d4cb475a71e99f03cb6060b8 100644 (file)
@@ -45,7 +45,7 @@ function poco_init(&$a) {
                        where `user`.`nickname` = '%s' and `profile`.`is-default` = 1 limit 1",
                        dbesc($user)
                );
-               if(! count($r) || $r[0]['hidewall'] || $r[0]['hide-friends'])
+               if(! dbm::is_result($r) || $r[0]['hidewall'] || $r[0]['hide-friends'])
                        http_status_exit(404);
 
                $user = $r[0];
@@ -83,7 +83,7 @@ function poco_init(&$a) {
                        dbesc(NETWORK_STATUSNET)
                );
        }
-       if(count($r))
+       if(dbm::is_result($r))
                $totalResults = intval($r[0]['total']);
        else
                $totalResults = 0;
@@ -173,7 +173,7 @@ function poco_init(&$a) {
        }
 
        if(is_array($r)) {
-               if(count($r)) {
+               if(count($r) > 0) {
                        foreach($r as $rr) {
                                if (!isset($rr['generation'])) {
                                        if ($global)