]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_prefs.php
Event upgraded to microformats2
[quix0rs-gnu-social.git] / classes / Profile_prefs.php
index 97df488b6a342dafcf8a01a3bd79150ebb05f68f..37ccf4fb9677263aceca5e31f6071282eb4f6680 100644 (file)
@@ -120,7 +120,7 @@ class Profile_prefs extends Managed_DataObject
     static function getConfigData(Profile $profile, $namespace, $topic) {
         try {
             $data = self::getData($profile, $namespace, $topic);
-        } catch (Exception $e) {
+        } catch (NoResultException $e) {
             $data = common_config($namespace, $topic);
         }
         return $data;
@@ -160,7 +160,7 @@ class Profile_prefs extends Managed_DataObject
         $pref->topic      = $topic;
         $pref->data       = $data;
         
-        if (!$pref->insert()) {
+        if ($pref->insert() === false) {
             throw new ServerException('Could not save profile preference.');
         }
         return true;