Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid convertion from BOOL to (NSMutableDictionary*) #23

Closed
GoogleCodeExporter opened this issue Aug 11, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

Fixed in https://code.google.com/p/gtm-oauth2/source/detail?r=121

Original comment by grobb...@google.com on 17 Jan 2014 at 2:38

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant