From: Hypolite Petovan Date: Thu, 7 Nov 2019 20:51:05 +0000 (-0500) Subject: [hotfix] Prevent fatal error in profile with pinned posts X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2200996d4484d8c4685c32d7b7d012c7cf3e2185;p=friendica.git [hotfix] Prevent fatal error in profile with pinned posts - `$a->profile['profile_uid']` may not be set - Addresses https://github.com/friendica/friendica/issues/7675#issuecomment-551255174 --- diff --git a/src/Module/Profile.php b/src/Module/Profile.php index cd0ee66bb9..60dc6aa1b4 100644 --- a/src/Module/Profile.php +++ b/src/Module/Profile.php @@ -349,7 +349,7 @@ class Profile extends BaseModule $items = DBA::toArray($items_stmt); - if ($pager->getStart() == 0) { + if ($pager->getStart() == 0 && !empty($a->profile['profile_uid'])) { $pinned_items = Item::selectPinned($a->profile['profile_uid'], ['uri']); $pinned = Item::inArray($pinned_items); $items = array_merge($items, $pinned);