From: Roland Häder Date: Thu, 19 Jul 2018 22:39:05 +0000 (+0200) Subject: Small cleanup (#5416) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b2899d76cf6ac9cae6a674e778e840ce09ceb9e7;p=friendica.git Small cleanup (#5416) - added internal TODO to decide about is_result() usage - removed semicolon (not needed here) from SQL query - added empty line Signed-off-by: Roland Häder --- diff --git a/mod/profiles.php b/mod/profiles.php index 9c925924f7..3ceb8c6645 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -479,6 +479,7 @@ function profiles_post(App $a) { intval(local_user()) ); + /// @TODO decide to use dbm::is_result() here and check $r if ($r) { info(L10n::t('Profile updated.') . EOL); } diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 8cc148ff94..5326e49ac9 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1978,7 +1978,7 @@ class DFRN * link an introduction to it. */ if (!DBM::is_result($r)) { - // database record did not get created. Quietly give up. + // Database record did not get created. Quietly give up. killme(); } @@ -2058,7 +2058,7 @@ class DFRN // update contact $r = q( - "SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d;", + "SELECT `photo`, `url` FROM `contact` WHERE `id` = %d AND `uid` = %d", intval($importer["id"]), intval($importer["importer_uid"]) ); @@ -2332,6 +2332,7 @@ class DFRN if ($xt->type == ACTIVITY_OBJ_NOTE) { $item_tag = Item::selectFirst(['id', 'tag'], ['uri' => $xt->id, 'uid' => $importer["importer_uid"]]); + if (!DBM::is_result($item_tag)) { logger("Query failed to execute, no result returned in " . __FUNCTION__); return false;