From: Mikael Nordfeldth Date: Sun, 6 Oct 2013 14:37:51 +0000 (+0200) Subject: listFind throws NoResultException on no results X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2770ef9718fb29110b6ab43ea6cffffa8cc4c27b;p=quix0rs-gnu-social.git listFind throws NoResultException on no results --- 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()) {