[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
This commit is contained in:
Hypolite Petovan 2019-11-07 15:51:05 -05:00 committed by GitHub
parent b8f2252a7f
commit 2200996d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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);