X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=classes%2FConversation.php;h=537c214a4c21991b54a20fea942a5c6a0ff2c325;hb=f9698598c6aa74d5f5e060989871f8e90d310adf;hp=343668cc49d95e6632488c77f87668ed690aaecf;hpb=611e5ab42137fc420bc9089185eff9795e028cc0;p=quix0rs-gnu-social.git diff --git a/classes/Conversation.php b/classes/Conversation.php index 343668cc49..537c214a4c 100644 --- a/classes/Conversation.php +++ b/classes/Conversation.php @@ -108,7 +108,13 @@ 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; + $conv->find(true); + if (!$conv instanceof Conversation) { + common_debug('Conversation does not exist for notice ID: '.$notice->id); + throw new NoResultException($conv); + } return $conv->getUrl($anchor ? $notice->id : null); }