From 1e2568da3c351235562cbf60bfd5e811d61b77c6 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Fri, 17 Jul 2015 22:55:00 +0200 Subject: [PATCH] Refactor. - KSMDecryptOTP returns array or bool false on failure. --- ykval-verify.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ykval-verify.php b/ykval-verify.php index 6ecbbbc..4813ded 100644 --- a/ykval-verify.php +++ b/ykval-verify.php @@ -274,8 +274,7 @@ if (array_key_exists('__YKVAL_KSM_CURL_OPTS__', $baseParams)) { $curlopts = $baseParams['__YKVAL_KSM_CURL_OPTS__']; } -$otpinfo = KSMdecryptOTP($urls, $myLog, $curlopts); -if (!is_array($otpinfo)) +if (($otpinfo = KSMdecryptOTP($urls, $myLog, $curlopts)) === FALSE) { sendResp(S_BAD_OTP, $myLog, $apiKey); }