After the changes made (shown in http://drupalcode.org/project/oauth.git/commitdiff/bc9b737 )

When I go to "Add authorization" to a consumer user via the admin interface, the following warnings arise:


Notice: Undefined variable: account in oauth_common_authorization_add() (line 76 of docroot/sites/all/modules/contrib/oauth/oauth_common.authorizations.inc).
Notice: Trying to get property of non-object in oauth_common_authorization_add() (line 76 of docroot/sites/all/modules/contrib/oauth/oauth_common.authorizations.inc).

The above happen because the menu handler is not loading the user and passing it to the callback function, which is oauth_common_authorization_add().

Comments

juampynr’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Mentioned the callback function.

charubachi’s picture

I am getting the same issue for "7.x-3.1".
If I go for the patch and click on add authorization then I get the below error.

Warning: Missing argument 2 for oauth_common_authorization_add() in oauth_common_authorization_add() (line 74 of C:\Users\charath\Sites\msa-prod-source\msa-prod-source\sites\all\modules\custom modules\oauth\oauth_common.authorizations.inc).
Notice: Undefined variable: consumer in oauth_common_authorization_add() (line 75 of C:\Users\charath\Sites\msa-prod-source\msa-prod-source\sites\all\modules\custom modules\oauth\oauth_common.authorizations.inc).
OAuthException: Needs an associated consumer in DrupalOAuthToken->__construct() (line 34 of C:\Users\charath\Sites\msa-prod-source\msa-prod-source\sites\all\modules\custom modules\oauth\includes\DrupalOAuthToken.inc).

charubachi’s picture

Version: 7.x-3.x-dev » 7.x-3.1
Issue summary: View changes
Status: Closed (fixed) » Needs work
charubachi’s picture

Issue summary: View changes

  • juampynr committed e107b8d on 8.x-2.x
    Issue #1987350 by juampy: Fixed Warnings when authorizing a consumer via...