Skip to content

Commit dae7544

Browse files
committed
Fix oauth method detection code
1 parent 380ff58 commit dae7544

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

codebird-cors-proxy.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,13 @@ function http_get_request_body()
159159

160160
// URLs always start with 1.1 or oauth
161161
$version_pos = strpos($url, '/1.1/');
162-
if ($version_pos === -1) {
162+
if ($version_pos === false) {
163163
$version_pos = strpos($url, '/oauth/');
164164
}
165-
if ($version_pos === -1) {
165+
if ($version_pos === false) {
166166
$version_pos = strpos($url, '/oauth2/');
167167
}
168-
if ($version_pos === -1) {
168+
if ($version_pos === false) {
169169
header('HTTP/1.1 412 Precondition failed');
170170
die('This proxy only supports requests to API version 1.1.');
171171
}

0 commit comments

Comments
 (0)