From e837caa9ced98c86ba1b5d6af66e94532fc06ef0 Mon Sep 17 00:00:00 2001 From: RobThree Date: Thu, 16 Jul 2015 15:43:45 +0200 Subject: [PATCH] * Force VerifyCode() to return bool --- lib/TwoFactorAuth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TwoFactorAuth.php b/lib/TwoFactorAuth.php index 6a68cc6..a2e4132 100644 --- a/lib/TwoFactorAuth.php +++ b/lib/TwoFactorAuth.php @@ -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; } /**