]> git.mxchange.org Git - friendica.git/commitdiff
Opps, wrong brace and removed invert of dbm::is_result()
authorRoland Haeder <roland@mxchange.org>
Sun, 18 Sep 2016 21:27:54 +0000 (23:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 18 Sep 2016 21:31:27 +0000 (23:31 +0200)
Signed-off-by: Roland Haeder <roland@mxchange.org>
include/api.php

index d6f6dec7d9b387fc86fd8cbc0c7aebd575b74dc8..521354edc12077dea6005353c311a84d458e9e10 100644 (file)
                        intval(api_user())
                );
 
-               if(dbm::is_result($r)) {
+               if(!dbm::is_result($r))
+                       return;
 
                $ids = array();
                foreach($r as $rr)
                        intval(api_user())
                );
 
-               if ((! count($r)) || ($r[0]['network'] !== NETWORK_DFRN))
+               if ((! dbm::is_result($r)) || ($r[0]['network'] !== NETWORK_DFRN))
                        throw new BadRequestException("Unknown contact");
 
                $cid = $r[0]['id'];
        }
        api_register_func('api/friendica/direct_messages_search', 'api_friendica_direct_messages_search', true);
 
-
 /*
 To.Do:
     [pagename] => api/1.1/statuses/lookup.json