]> git.mxchange.org Git - friendica.git/blobdiff - include/message.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / include / message.php
index 51f3ad805a667fcbd45242625bb4f539d96d145c..041110440450df8fdf0729b23075a32cc386253d 100644 (file)
@@ -41,7 +41,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                        dbesc($replyto),
                        dbesc($replyto)
                );
-               if(count($r))
+               if(dbm::is_result($r))
                        $convid = $r[0]['convid'];
        }
 
@@ -74,7 +74,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                        dbesc($conv_guid),
                        intval(local_user())
                );
-               if(count($r))
+               if(dbm::is_result($r))
                        $convid = $r[0]['id'];
        }
 
@@ -113,7 +113,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                dbesc($uri),
                intval(local_user())
        );
-       if(count($r))
+       if(dbm::is_result($r))
                $post_id = $r[0]['id'];
 
        /**
@@ -210,7 +210,7 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
                dbesc($conv_guid),
                intval($recipient['uid'])
        );
-       if(count($r))
+       if(dbm::is_result($r))
                $convid = $r[0]['id'];
 
        if(! $convid) {