From 2200996d4484d8c4685c32d7b7d012c7cf3e2185 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Thu, 7 Nov 2019 15:51:05 -0500 Subject: [PATCH] [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 --- src/Module/Profile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);