Skip to content

Commit

Permalink
Fix empty issue in PHP 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Sephster committed Jun 22, 2018
1 parent 3bec591 commit 8335935
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 8335935

Please sign in to comment.