Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit b92e04c

Browse files
committed
🚿 OAuth1Provider:parseTokenResponse(): $data is always an array
1 parent 1c3a551 commit b92e04c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Core/OAuth1Provider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Psr\Http\Message\{RequestInterface, ResponseInterface, UriInterface};
1616

1717
use function array_map, array_merge, base64_encode, bin2hex, function_exists, hash_hmac,
18-
implode, in_array, is_array, random_bytes, strtoupper, time;
18+
implode, in_array, random_bytes, strtoupper, time;
1919
use function chillerlan\HTTP\Utils\{decompress_content, parseUrl};
2020

2121
/**
@@ -81,7 +81,7 @@ public function getRequestToken():AccessToken{
8181
protected function parseTokenResponse(ResponseInterface $response, bool $checkCallbackConfirmed = null):AccessToken{
8282
$data = $this->parseQuery(decompress_content($response));
8383

84-
if(!$data || !is_array($data)){
84+
if(empty($data)){
8585
throw new ProviderException('unable to parse token response');
8686
}
8787
elseif(isset($data['error'])){

0 commit comments

Comments
 (0)