authorize string in setURL:forKey:

This commit is contained in:
Antoine Mercadal committed 2010-11-05 17:28:18 +01:00
1 parent b96abb5fd4
commit 6a2b347b21
1 file changed
+1 -1
+1 -1
View File
@@ -568,7 +568,7 @@ var StandardUserDefaults;
*/
- (void)setURL:(CPURL)anURL forKey:(CPString)aKey
{
if ([anURL class] !== CPURL)
if ([anURL class] !== CPURL && [anURL class] !== CPString)
[CPException raise:CPInvalidArgumentException reason:anURL + @" is not a valid CPURL"];
[self setObject:anURL forKey:aKey];
}