Invalid convertion from BOOL to (NSMutableDictionary*)
Closed this issue · 0 comments
GoogleCodeExporter commented
In GTMOAuth2SignIn.m, the -[GTMOAuth2SignIn parametersForWebRequest] method may
return "NO" if both hasClientID and hasRedirect are both "NO".
> - (NSMutableDictionary *)parametersForWebRequest {
> GTMOAuth2Authentication *auth = self.authentication;
> NSString *clientID = auth.clientID;
> NSString *redirectURI = auth.redirectURI;
>
> BOOL hasClientID = ([clientID length] > 0);
> BOOL hasRedirect = ([redirectURI length] > 0
> || redirectURI == [[self class]
nativeClientRedirectURI]);
> if (!hasClientID || !hasRedirect) {
> #if DEBUG
> NSAssert(hasClientID, @"GTMOAuth2SignIn: clientID needed");
> NSAssert(hasRedirect, @"GTMOAuth2SignIn: redirectURI needed");
> #endif
> return NO;
> }
Here, the "return NO;" should either be "return nil;" or "return
[NSMutableDictionary dictionaryWithObjectsAndKeys:nil];".
Original issue reported on code.google.com by sdefresne@chromium.org
on 16 Jan 2014 at 2:27