Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MTLManagedObjectAdapter: Fix a bug where errors are silently handled

It was using `error` but this error is replaced later in the method and never
passed as an error.

```objective-c
if (error != NULL) {
    *error = tmpError;
}
```
  • Loading branch information...
commit e21c9c327cabcdf2ebef428bdcf2d8fab6c7b70f 1 parent eb2178a
@kylef kylef authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  Mantle/MTLManagedObjectAdapter.m
View
2  Mantle/MTLManagedObjectAdapter.m
@@ -392,7 +392,7 @@ - (id)managedObjectFromModel:(MTLModel<MTLManagedObjectSerializing> *)model inse
NSValueTransformer *attributeTransformer = [self entityAttributeTransformerForKey:propertyKey];
if (attributeTransformer != nil) transformedValue = [attributeTransformer transformedValue:transformedValue];
- if (![managedObject validateValue:&transformedValue forKey:managedObjectKey error:error]) return NO;
+ if (![managedObject validateValue:&transformedValue forKey:managedObjectKey error:&tmpError]) return NO;
[managedObject setValue:transformedValue forKey:managedObjectKey];
return YES;
Please sign in to comment.
Something went wrong with that request. Please try again.