Skip to content

Commit

Permalink
Merge pull request #85 from SURFnet/bugfix/null-second-factor-id
Browse files Browse the repository at this point in the history
Don't attempt to fetch second factor when id is null
  • Loading branch information
rjkip committed Sep 30, 2015
2 parents ac3bdb2 + 49c88ad commit 5d42ed6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ public function __construct(ResponseContext $responseContext, SecondFactorServic
public function setRequestLocale(GetResponseEvent $event)
{
$secondFactorId = $this->responseContext->getSelectedSecondFactor();
$secondFactor = $this->secondFactorService->findByUuid($secondFactorId);
if (!$secondFactorId) {
return;
}

$secondFactor = $this->secondFactorService->findByUuid($secondFactorId);
if (!$secondFactor) {
return;
}
Expand Down

0 comments on commit 5d42ed6

Please sign in to comment.