aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-12-16 10:23:33 +0100
committerMax Kostikov <max@kostikov.co>2019-12-16 10:23:33 +0100
commitd71dd21abc49b7a5f912b0842eb5a14a4cc3d172 (patch)
tree6a9dd00f8131ae679ddb556742cabda68fd39c39 /Zotlabs/Widget
parente1400e5745d154b365aeab11b971a6c7d201f3a9 (diff)
downloadvolse-hubzilla-d71dd21abc49b7a5f912b0842eb5a14a4cc3d172.tar.gz
volse-hubzilla-d71dd21abc49b7a5f912b0842eb5a14a4cc3d172.tar.bz2
volse-hubzilla-d71dd21abc49b7a5f912b0842eb5a14a4cc3d172.zip
Fix possibly unknown author
Diffstat (limited to 'Zotlabs/Widget')
-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>'
);