Skip to content

Commit

Permalink
* Force VerifyCode() to return bool
Browse files Browse the repository at this point in the history
  • Loading branch information
RobThree committed Jul 16, 2015
1 parent 0332a61 commit e837caa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/TwoFactorAuth.php
Expand Up @@ -108,7 +108,7 @@ public function verifyCode($secret, $code, $discrepancy = 1, $time = null)
for ($i = -$discrepancy; $i <= $discrepancy; $i++)
$result |= $this->codeEquals($this->getCode($secret, $timetamp + ($i * $this->period)), $code);

return $result;
return (bool)$result;
}

/**
Expand Down

0 comments on commit e837caa

Please sign in to comment.