forked from GNUsocial/gnu-social
listFind throws NoResultException on no results
This commit is contained in:
parent
fb94a16217
commit
2770ef9718
@ -84,7 +84,11 @@ class Profile_prefs extends Managed_DataObject
|
|||||||
|
|
||||||
static function getAll(Profile $profile)
|
static function getAll(Profile $profile)
|
||||||
{
|
{
|
||||||
$prefs = self::listFind('profile_id', $profile->id);
|
try {
|
||||||
|
$prefs = self::listFind('profile_id', $profile->id);
|
||||||
|
} catch (NoResultException $e) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$list = array();
|
$list = array();
|
||||||
while ($entry = $prefs->fetch()) {
|
while ($entry = $prefs->fetch()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user