]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Conversation.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / classes / Conversation.php
index 343668cc49d95e6632488c77f87668ed690aaecf..9ef1e06b76a73d14d789c580dd8b6652553baf84 100644 (file)
@@ -108,7 +108,12 @@ class Conversation extends Managed_DataObject
 
     static public function getUrlFromNotice(Notice $notice, $anchor=true)
     {
-        $conv = self::getKV('id', $notice->conversation);
+        $conv = new Conversation();
+        $conv->id = $notice->conversation;
+        if (!$conv->find(true)) {
+            common_debug('Conversation does not exist for notice ID: '.$notice->id);
+            throw new NoResultException($conv);
+        }
         return $conv->getUrl($anchor ? $notice->id : null);
     }