X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fsocgraph.php;h=6249f189e9a0a0d30c0b44cfa4fa78fd95ba86ec;hb=0e64d462df91865c55d112aeb19f3b8169981ba9;hp=64f78b4585cc544fbc6c517b8c0e28cc13a3050a;hpb=e95337e9ae04f0535877ea3dc550eec74a21bb94;p=friendica.git diff --git a/include/socgraph.php b/include/socgraph.php index 64f78b4585..6249f189e9 100644 --- a/include/socgraph.php +++ b/include/socgraph.php @@ -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));