diff --git a/classes/Profile_prefs.php b/classes/Profile_prefs.php index 8589485286..d7da8813e3 100644 --- a/classes/Profile_prefs.php +++ b/classes/Profile_prefs.php @@ -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()) {