]> git.mxchange.org Git - friendica.git/blobdiff - include/socgraph.php
diaspora - add braces
[friendica.git] / include / socgraph.php
index 64f78b4585cc544fbc6c517b8c0e28cc13a3050a..6249f189e9a0a0d30c0b44cfa4fa78fd95ba86ec 100644 (file)
@@ -220,8 +220,9 @@ function poco_check($profile_url, $name, $network, $profile_photo, $about, $loca
        $r = q("SELECT `network` FROM `contact` WHERE `nurl` = '%s' AND `network` != '' AND `network` != '%s' LIMIT 1",
                dbesc(normalise_link($profile_url)), dbesc(NETWORK_STATUSNET)
        );
-       if (dbm::is_result($r))
+       if (dbm::is_result($r)) {
                $network = $r[0]["network"];
+       }
 
        if (($network == "") OR ($network == NETWORK_OSTATUS)) {
                $r = q("SELECT `network`, `url` FROM `contact` WHERE `alias` IN ('%s', '%s') AND `network` != '' AND `network` != '%s' LIMIT 1",
@@ -1575,7 +1576,7 @@ function get_gcontact_id($contact) {
                proc_run(PRIORITY_LOW, 'include/gprobe.php', bin2hex($contact["url"]));
        }
 
-       if ((count($r) > 1) AND ($gcontact_id > 0) AND ($contact["url"] != ""))
+       if ((dbm::is_result($r)) AND (count($r) > 1) AND ($gcontact_id > 0) AND ($contact["url"] != ""))
         q("DELETE FROM `gcontact` WHERE `nurl` = '%s' AND `id` != %d",
                dbesc(normalise_link($contact["url"])),
                intval($gcontact_id));