Mhurd has uploaded a new change for review. https://gerrit.wikimedia.org/r/151259
Change subject: Null protection for section op. ...................................................................... Null protection for section op. Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 --- M wikipedia/Data/Operations/DownloadSectionsOp.m 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia refs/changes/59/151259/1 diff --git a/wikipedia/Data/Operations/DownloadSectionsOp.m b/wikipedia/Data/Operations/DownloadSectionsOp.m index d815f72..dbdc6bb 100644 --- a/wikipedia/Data/Operations/DownloadSectionsOp.m +++ b/wikipedia/Data/Operations/DownloadSectionsOp.m @@ -113,7 +113,7 @@ NSString *lastmodifiedDateString = weakSelf.jsonRetrieved[@"mobileview"][@"lastmodified"]; NSDate *lastmodifiedDate = [lastmodifiedDateString getDateFromIso8601DateString]; - if (!lastmodifiedDate) { + if (!lastmodifiedDate || [lastmodifiedDate isNull]) { NSLog(@"Bad lastmodified date, will show as recently modified as a workaround"); lastmodifiedDate = [[NSDate alloc] init]; } @@ -147,6 +147,7 @@ protectionStatus = protectionDict[@"edit"][0]; } } + if (!protectionStatus || [protectionStatus isNull]) protectionStatus = @""; NSMutableDictionary *output = @{ @"sections": outputSections, -- To view, visit https://gerrit.wikimedia.org/r/151259 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I42fde6f0e7d7baa2d2d9b8798496deedfb27a235 Gerrit-PatchSet: 1 Gerrit-Project: apps/ios/wikipedia Gerrit-Branch: master Gerrit-Owner: Mhurd <mh...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits