projects
/
friendica.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8f2252
)
[hotfix] Prevent fatal error in profile with pinned posts
author
Hypolite Petovan
<hypolite@mrpetovan.com>
Thu, 7 Nov 2019 20:51:05 +0000
(15:51 -0500)
committer
GitHub
<noreply@github.com>
Thu, 7 Nov 2019 20:51:05 +0000
(15:51 -0500)
- `$a->profile['profile_uid']` may not be set
- Addresses https://github.com/friendica/friendica/issues/7675#issuecomment-
551255174
src/Module/Profile.php
patch
|
blob
|
history
diff --git
a/src/Module/Profile.php
b/src/Module/Profile.php
index cd0ee66bb95ef871c9a4d624806a84f7ca21ebb4..60dc6aa1b447074910eb3438b61da7dd8bf6974d 100644
(file)
--- 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);