aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-12-16 21:51:40 +0100
committerMax Kostikov <max@kostikov.co>2019-12-16 21:51:40 +0100
commitd5aeb136019a5f9e4a71c8353ab13c3195782e0b (patch)
treed3533535f1e8899fbe2e1be7d0b14d9d0aa253cf
parent124cc4396247c75c14280136cfaa95415860ad4c (diff)
parentd71dd21abc49b7a5f912b0842eb5a14a4cc3d172 (diff)
downloadvolse-hubzilla-d5aeb136019a5f9e4a71c8353ab13c3195782e0b.tar.gz
volse-hubzilla-d5aeb136019a5f9e4a71c8353ab13c3195782e0b.tar.bz2
volse-hubzilla-d5aeb136019a5f9e4a71c8353ab13c3195782e0b.zip
Merge branch 'dev' into 'dev'
Fix possibly unknown author See merge request hubzilla/core!1808
-rw-r--r--Zotlabs/Widget/Pinned.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Pinned.php b/Zotlabs/Widget/Pinned.php
index 3324206f4..0a7806908 100644
--- a/Zotlabs/Widget/Pinned.php
+++ b/Zotlabs/Widget/Pinned.php
@@ -267,8 +267,8 @@ class Pinned {
$author = q("SELECT * FROM xchan WHERE xchan_hash = '%s' LIMIT 1",
dbesc($rr['author_xchan'])
);
- $name = ($author[0]['xchan_name'] ? $author[0]['xchan_name'] : t('Unknown'));
- $conv_responses[$verb]['list'][] = (($rr['author_xchan'] && $author[0]['xchan_photo_s']) ?
+ $name = (($author && $author[0]['xchan_name']) ? $author[0]['xchan_name'] : t('Unknown'));
+ $conv_responses[$verb]['list'][] = (($rr['author_xchan'] && $author && $author[0]['xchan_photo_s']) ?
'<a class="dropdown-item" href="' . chanlink_hash($rr['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($author[0]['xchan_photo_s']) . '" alt="' . urlencode($name) . '" /> ' . $name . '</a>' :
'<a class="dropdown-item" href="#" class="disabled">' . $name . '</a>'
);