Commit 2770ef97 authored by mmn's avatar mmn

listFind throws NoResultException on no results

parent fb94a162
......@@ -84,7 +84,11 @@ class Profile_prefs extends Managed_DataObject
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();
while ($entry = $prefs->fetch()) {
......
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