diff --git a/lib/Bitbucket/API/Http/Listener/OAuthListener.php b/lib/Bitbucket/API/Http/Listener/OAuthListener.php index 4bf395a..e8a3a93 100644 --- a/lib/Bitbucket/API/Http/Listener/OAuthListener.php +++ b/lib/Bitbucket/API/Http/Listener/OAuthListener.php @@ -217,9 +217,9 @@ protected function getSigner() */ protected function initToken($token) { - return (!is_null($token)) ? + return ((!is_null($token)) ? $token : - empty($this->config['oauth_token']) ? + empty($this->config['oauth_token'])) ? new OAuth1\Token\NullToken() : new OAuth1\Token\Token($this->config['oauth_token'], $this->config['oauth_token_secret']) ;