[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
2022.09-rc
Hypolite Petovan 2019-11-07 15:51:05 -05:00 zatwierdzone przez GitHub
rodzic b8f2252a7f
commit 2200996d44
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

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