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

Deprecation fixes #34

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vendor-src/oauth-php/library/OAuthRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ private function parseHeaders ()
{
$v = trim($v);
list($name,$value) = explode('=', $v, 2);
if (!empty($value) && $value{0} == '"' && substr($value, -1) == '"')
if (!empty($value) && $value[0] == '"' && substr($value, -1) == '"')
{
$value = substr(substr($value, 1), 0, -1);
}
Expand Down Expand Up @@ -843,4 +843,4 @@ public function redirect ( $uri, $params )

/* vi:set ts=4 sts=4 sw=4 binary noeol: */

?>
?>
6 changes: 3 additions & 3 deletions vendor-src/oauth-php/library/OAuthRequester.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ protected function curl_parse ( $response )
@list($headers,$body) = explode("\r\n\r\n",$response,2);
$lines = explode("\r\n",$headers);

if (preg_match('@^HTTP/[0-9]\.[0-9] +100@', $lines[0]))
if (preg_match('@^HTTP/[0-9]\.?[0-9]? +100@', $lines[0]))
{
/* HTTP/1.x 100 Continue
* the real data is on the next line
Expand All @@ -469,7 +469,7 @@ protected function curl_parse ( $response )

// first line of headers is the HTTP response code
$http_line = array_shift($lines);
if (preg_match('@^HTTP/[0-9]\.[0-9] +([0-9]{3})@', $http_line, $matches))
if (preg_match('@^HTTP/[0-9]\.?[0-9]? +([0-9]{3})@', $http_line, $matches))
{
$code = $matches[1];
}
Expand Down Expand Up @@ -518,4 +518,4 @@ protected function prepareCurlOptions ( $curl_options, $extra_headers )

/* vi:set ts=4 sts=4 sw=4 binary noeol: */

?>
?>