]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Handle lack of parent nicely
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 26 Dec 2015 15:36:03 +0000 (16:36 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 26 Dec 2015 15:36:03 +0000 (16:36 +0100)
lib/noticelistitem.php

index d7cc57188d936586917ef5b06e3b35b7d2a5d302..8c27ae4e84fd9d87db42501e0d40077a7fd1777e 100644 (file)
@@ -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');
         }