RichardSisonFerrer / oauth

Automatically exported from code.google.com/p/oauth
0 stars 0 forks source link

PHP - Calling from_consumer_and_token without null parameters #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Calling from_consumer_and_token without null parameters

What is the expected output? What do you see instead?
Defaults aren't merged with:
$parameters = array_merge($defaults, $parameters);
As one of the arrays is NULL, it screws nicely.

So, if $parameters is null, we should just use $defaults, and not merge

Original issue reported on code.google.com by adamca...@gmail.com on 25 May 2010 at 10:20

GoogleCodeExporter commented 9 years ago

Original comment by morten.f...@gmail.com on 28 May 2010 at 7:00

GoogleCodeExporter commented 9 years ago
I can't seen to replicate this error, and we have a unit-test that does exactly 
what you are describing and testing that it works..

See testCreateRequestFromConsumerAndToken in tests/OAuthRequestTest.php for the 
tests it self.. As you can see, it calls from_consumer_and_token with no 
parameters and checks that e.g. the oauth_version parameter defaults to 1.0..

Can you try and run the unit-tests to see if they fail for you? (You need to 
install PHPUnit from phpunit.de, and the run phpunit --configuration 
OAuthTests.xml from the code/php dir.

Original comment by morten.f...@gmail.com on 12 Jun 2010 at 8:44