From: Michael Date: Thu, 22 Feb 2018 07:05:56 +0000 (+0000) Subject: Bugfix: $uid wasn't available in that context X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=046352606ec0500b30014b0406c0db958ebe119e;p=friendica.git Bugfix: $uid wasn't available in that context --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 4634358d2e..cbc1ac08ff 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -286,22 +286,22 @@ class Item extends BaseObject * This is done only for comments */ if ($item['parent-uri'] != $item['uri']) { - $contact_id = Contact::getIdForURL($item['author-link'], $uid); + $contact_id = Contact::getIdForURL($item['author-link'], $item['uid']); } // If not present then maybe the owner was found if ($contact_id == 0) { - $contact_id = Contact::getIdForURL($item['owner-link'], $uid); + $contact_id = Contact::getIdForURL($item['owner-link'], $item['uid']); } // Still missing? Then use the "self" contact of the current user if ($contact_id == 0) { - $self = dba::selectFirst('contact', ['id'], ['self' => true, 'uid' => $uid]); + $self = dba::selectFirst('contact', ['id'], ['self' => true, 'uid' => $item['uid']]); if (DBM::is_result($self)) { $contact_id = $self["id"]; } } - logger("Contact-id was missing for post ".$item["guid"]." from user id ".$uid." - now set to ".$contact_id, LOGGER_DEBUG); + logger("Contact-id was missing for post ".$item['guid']." from user id ".$item['uid']." - now set to ".$contact_id, LOGGER_DEBUG); return $contact_id; }