Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Error: Could not generate new Access token. Invalid response from server #665

Merged
merged 1 commit into from
Oct 3, 2016

Conversation

ahmad-saad
Copy link
Contributor

Passing null as length will not make mb_substr use it's default, instead it will interpret it as 0.
$result = mb_substr($result, $responseHeaderSize, null, '8bit');
Instead use:
$result = mb_substr($result, $responseHeaderSize, mb_strlen($result), '8bit');

Passing null as length will not make mb_substr use it's default, instead it will interpret it as 0.
$result = mb_substr($result, $responseHeaderSize, null, '8bit');
Instead use:
$result = mb_substr($result, $responseHeaderSize, mb_strlen($result), '8bit');
@jaypatel512 jaypatel512 merged commit d51a8d3 into paypal:master Oct 3, 2016
@jaypatel512
Copy link
Contributor

Hey @ahmad-saad !

Thanks for the PR. I tested your fix, and it seems like it fixes what you said. However, passing null worked for my development environment just fine. Could be specific to PHP version.

@ahmad-saad
Copy link
Contributor Author

Hey jaypatel512,

ja I think so, that it related to PHP version

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

Successfully merging this pull request may close these issues.

2 participants