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

Already on GitHub? Sign in to your account

Fixed issue if you want to do more than one request with the same request type #3

Merged
merged 1 commit into from Mar 27, 2012

Conversation

Projects
None yet
2 participants
Contributor

davidbehler commented Mar 6, 2012

include leads to an error like this:

Fatal error: Cannot redeclare class OAuth_Request_Resource in /var/www/../OAuth_Request_Resource.php on line 18

After doing the get_user_info request via the flickr provider, I needed to make another request to get a list of photosets and for that purpose I added another method to the flickr provider which does another request with type 'resource' and that's when I got the above error because the OAuth_Request forge tries to inlcude the OAuth_Request_Resource.php again and that leads to the redeclaration of the class.

There might be other cases(classes where this is an issue. I could update all classes to use include_once instead of include, don't think it would break anything.

David Behler Fixed issue if you want to do more than one request with the same req…
…uest type. include leads to an error like this:

Fatal error: Cannot redeclare class OAuth_Request_Resource in /var/www/../OAuth_Request_Resource.php on line 18

After doing the get_user_info request via the flickr provider, I needed to make another request to get a list of photosets and for that purpose I added another method to the flickr provider which does another request with type 'resource' and that's when I got the above error because the OAuth_Request forge tries to inlcude the OAuth_Request_Resource.php again and that leads to the redeclaration of the class.

There might be other cases(classes where this is an issue. I could update all classes to use include_once instead of include, don't think it would break anything.
12f77ae

@philsturgeon philsturgeon pushed a commit that referenced this pull request Mar 27, 2012

Phil Sturgeon Merge pull request #3 from waldmeister/master
Fixed issue if you want to do more than one request with the same request type
5da33e9

@philsturgeon philsturgeon merged commit 5da33e9 into philsturgeon:master Mar 27, 2012

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