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

Bugfix for php 5.3 #437

Merged
merged 1 commit into from
Dec 21, 2015
Merged

Bugfix for php 5.3 #437

merged 1 commit into from
Dec 21, 2015

Conversation

nosnickid
Copy link

String index checking in php 5.3 permits string to integer casting, e.g.

$string = 'a string';
echo $string['index']; // echos 'a'

This fix ensures the $bodyParams are an array before trying to extract the oauth_session_handle

@@ -212,4 +212,32 @@ public function testRequest()

$this->assertSame('response!', $service->request('/my/awesome/path'));
}

/**
* Test fails only in php5.3.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it fails with PHP 5.3 why isn't the build failing?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request also contains the fix, and the CI only ran against the
most recent commit. The test will just guard against any future regressions.
On 15 Oct 2015 23:44, "Elliot Chance" [email protected] wrote:

In tests/Unit/OAuth1/Service/AbstractServiceTest.php
#437 (comment):

@@ -212,4 +212,32 @@ public function testRequest()

     $this->assertSame('response!', $service->request('/my/awesome/path'));
 }
  • /**
  • \* Test fails only in php5.3.
    

If it fails with PHP 5.3 why isn't the build failing?


Reply to this email directly or view it on GitHub
https://github.com/Lusitanian/PHPoAuthLib/pull/437/files#r42190656.

@nosnickid
Copy link
Author

Hi! Any further thoughts on merging this PR?

$client->expects($this->once())->method('retrieveResponse')->will($this->returnValue('response!'));

$token = $this->getMock('\\OAuth\\OAuth1\\Token\\TokenInterface');
//$token->expects($this->once())->method('getRequestTokenSecret')->will($this->returnValue('baz'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line please

@nosnickid
Copy link
Author

Hello, I've updated the comment and rebased on top of your new master.

@elliotchance
Copy link
Collaborator

The original line that was commented out is still there.

@nosnickid
Copy link
Author

Ah, I misinterpreted which line you meant. That's gone.

elliotchance added a commit that referenced this pull request Dec 21, 2015
@elliotchance elliotchance merged commit 769fea1 into daviddesberg:master Dec 21, 2015
@elliotchance
Copy link
Collaborator

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

Successfully merging this pull request may close these issues.

2 participants