[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:
parent
b8f2252a7f
commit
2200996d44
1 changed files with 1 additions and 1 deletions
|
@ -349,7 +349,7 @@ class Profile extends BaseModule
|
||||||
|
|
||||||
$items = DBA::toArray($items_stmt);
|
$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_items = Item::selectPinned($a->profile['profile_uid'], ['uri']);
|
||||||
$pinned = Item::inArray($pinned_items);
|
$pinned = Item::inArray($pinned_items);
|
||||||
$items = array_merge($items, $pinned);
|
$items = array_merge($items, $pinned);
|
||||||
|
|
Loading…
Reference in a new issue