From 8335935854ad0a9fcb2ae89c685d09e3d67848a3 Mon Sep 17 00:00:00 2001 From: sephster Date: Fri, 22 Jun 2018 13:47:22 +0100 Subject: [PATCH] Fix empty issue in PHP 5.4 --- src/ResourceServer.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ResourceServer.php b/src/ResourceServer.php index 697afdf4..79ed9939 100644 --- a/src/ResourceServer.php +++ b/src/ResourceServer.php @@ -138,7 +138,9 @@ class ResourceServer extends AbstractServer */ 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')