Added null checks before calling set functions

This commit is contained in:
Andrew Millington
2018-04-21 21:29:21 +01:00
parent 143afc9561
commit 80bc291c51
5 changed files with 16 additions and 5 deletions

View File

@ -270,7 +270,11 @@ class AuthCodeGrant extends AbstractAuthorizeGrant
$authorizationRequest->setGrantTypeId($this->getIdentifier());
$authorizationRequest->setClient($client);
$authorizationRequest->setRedirectUri($redirectUri);
$authorizationRequest->setState($stateParameter);
if ($stateParameter !== null) {
$authorizationRequest->setState($stateParameter);
}
$authorizationRequest->setScopes($scopes);
if ($this->enableCodeExchangeProof === true) {