Browse Source

[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
pull/7826/head
Hypolite Petovan 3 years ago committed by GitHub
parent
commit
2200996d44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Module/Profile.php

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

Loading…
Cancel
Save