From: Mikael Nordfeldth <mmn@hethane.se>
Date: Sat, 26 Dec 2015 15:36:03 +0000 (+0100)
Subject: Handle lack of parent nicely
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=83c112e24babce57876abfee98f19cf9eee424e4;p=quix0rs-gnu-social.git

Handle lack of parent nicely
---

diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php
index d7cc57188d..8c27ae4e84 100644
--- a/lib/noticelistitem.php
+++ b/lib/noticelistitem.php
@@ -154,7 +154,11 @@ class NoticeListItem extends Widget
 
         if (!empty($this->notice->reply_to) || count($this->getProfileAddressees()) > 0) {
             $this->elementStart('div', array('class' => 'parents'));
-            if (!empty($this->notice->reply_to)) { $this->showParent(); }
+            try {
+                $this->showParent();
+            } catch (NoParentNoticeException $e) {
+                // no parent notice
+            }
             if ($this->addressees) { $this->showAddressees(); }
             $this->elementEnd('div');
         }