We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 925aacec authored by mattl's avatar mattl

Throw exception when a Conversation is not found

parent bb8d377b
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment