Skip to content

Instantly share code, notes, and snippets.

@tjlytle
Last active December 22, 2015 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjlytle/6544669 to your computer and use it in GitHub Desktop.
Save tjlytle/6544669 to your computer and use it in GitHub Desktop.
Fix for PHP oAuthProvider::reportProblem()
<?php
$headers = OAuthProvider::reportProblem($e, false);
if(strpos($headers, 'debug_sbs') !== false){
$parts = explode('&', $headers, 2);
array_walk($parts, function(&$value){
$value = str_replace('&', '%26', $value);
});
$headers = implode('&', $parts);
}
@tjlytle
Copy link
Author

tjlytle commented Sep 12, 2013

See this for bug details: https://bugs.php.net/bug.php?id=59337

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