From d71dd21abc49b7a5f912b0842eb5a14a4cc3d172 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Mon, 16 Dec 2019 10:23:33 +0100 Subject: Fix possibly unknown author --- Zotlabs/Widget/Pinned.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Widget') 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']) ? '' . '' . urlencode($name) . ' ' . $name . '' : '' . $name . '' ); -- cgit v1.2.3