Skip to content

Commit

Permalink
Merge pull request #918 from Sephster/fix-914
Browse files Browse the repository at this point in the history
Fix empty issue in PHP 5.4
  • Loading branch information
Sephster authored Jun 23, 2018
2 parents 3bec591 + 8335935 commit 1385249
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ResourceServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public function isValidRequest($headerOnly = true, $accessToken = null)
*/
public function determineAccessToken($headerOnly = false)
{
if (!empty($this->getRequest()->headers->get('Authorization'))) {
$authHeader = $this->getRequest()->headers->get('Authorization');

if (!empty($authHeader)) {
$accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest());
} elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) {
$accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET')
Expand Down

0 comments on commit 1385249

Please sign in to comment.