X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffcontact.php;h=b2706e51a0226e3cc13bfd6cafb4179a8c249fd6;hb=0cd9db9cb7f4c96f597e37590a536eaae123238d;hp=8821a985f2dc06e77619ce6bf7719c422358b031;hpb=43d5876e8b35d53a0bef5248c5d63e5bc209dbbf;p=friendica.git diff --git a/include/fcontact.php b/include/fcontact.php index 8821a985f2..b2706e51a0 100644 --- a/include/fcontact.php +++ b/include/fcontact.php @@ -10,7 +10,7 @@ function fcontact_store($url,$name,$photo) { dbesc($nurl) ); - if(count($r)) + if (dbm::is_result($r)) return $r[0]['id']; $r = q("INSERT INTO `fcontact` ( `url`, `name`, `photo` ) VALUES ( '%s', '%s', '%s' ) ", @@ -19,11 +19,11 @@ function fcontact_store($url,$name,$photo) { dbesc($photo) ); - if($r) { + if (dbm::is_result($r)) { $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' LIMIT 1", dbesc($nurl) ); - if(count($r)) + if (dbm::is_result($r)) return $r[0]['id']; }