forked from GNUsocial/gnu-social
Use exceptions for Notice::getByUri
..jeez, a long time since I commited. Three in a row to get this right. Sorry :)
This commit is contained in:
parent
08dba7e21d
commit
edee39790e
@ -218,7 +218,12 @@ class Notice extends Managed_DataObject
|
||||
|
||||
public static function getByUri($uri)
|
||||
{
|
||||
return static::getKV('uri', $uri);
|
||||
$notice = new Notice();
|
||||
$notice->uri = $uri;
|
||||
if (!$notice->find(true)) {
|
||||
throw new NoResultException($notice);
|
||||
}
|
||||
return $notice;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user