tciuro / NanoStore

NanoStore is an open source, lightweight schema-less local key-value document store written in Objective-C for Mac OS X and iOS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

+[NSFNanoObject NSObjectToJSONString:error:] improperly checks error parameter

billgarrison opened this issue · comments

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;
    }

Nice catch Bill! Much appreciated.