+[NSFNanoObject NSObjectToJSONString:error:] improperly checks error parameter
billgarrison opened this issue · comments
Bill Garrison commented
When an NSJSONSerialization error occurs, this method improperly checks whether the caller wants the serialization error.
At NSFNanoObject line 259:
+ (NSString *)_NSObjectToJSONString:(id)object error:(NSError **)error
{
...
if (*error) {
*error = tempError;
}
...
}
This check should read:
if (error != NULL) {
*error = tempError;
}
Tito Ciuro commented
Nice catch Bill! Much appreciated.