diff --git a/ChangeLog b/ChangeLog index 13e3f8b63..cf576a1ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2009-03-20 Wolfgang Sourdeau + * SoObjects/SOGo/SOGoUserDefaults.m ([SOGoUserDefaults + -jsonRepresentation]): return "{}" if values is nil (due to a DB + connection error). + * SoObjects/SOGo/SOGoUser.m ([SOGoUser -userDefaults]): ensure the values are not nil before putting them in the cache. This fixes an exception occuring for setting a nil key in a dictionary. diff --git a/SoObjects/SOGo/SOGoUserDefaults.m b/SoObjects/SOGo/SOGoUserDefaults.m index 7691f2a86..41cc5818c 100644 --- a/SoObjects/SOGo/SOGoUserDefaults.m +++ b/SoObjects/SOGo/SOGoUserDefaults.m @@ -314,9 +314,15 @@ static NSString *uidColumnName = @"c_uid"; - (NSString *) jsonRepresentation { - [self fetchProfile]; + NSString *jsonRep; - return [values jsonRepresentation]; + [self fetchProfile]; + if (values) + jsonRep = [values jsonRepresentation]; + else + jsonRep = @"{}"; + + return jsonRep; } /* value access */