From 3d119013a4999695c3d1faea7bb36d92777f0cd3 Mon Sep 17 00:00:00 2001 From: Anyon Date: Thu, 26 Sep 2019 09:58:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=9B=B4=E6=96=B0]=E5=BC=BA=E5=88=B6=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E9=AA=8C=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/service/CaptchaService.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/admin/service/CaptchaService.php b/application/admin/service/CaptchaService.php index 72f253608..f574407ff 100644 --- a/application/admin/service/CaptchaService.php +++ b/application/admin/service/CaptchaService.php @@ -137,9 +137,7 @@ class CaptchaService { $_uni = is_string($uniqid) ? $uniqid : input('uniqid', '-'); $_val = Cache::tag('captcha')->get($_uni); - if (is_string($_val) && strtolower($_val) === strtolower($code)) { - Cache::tag('captcha')->rm($_uni); - return true; - } else return false; + Cache::tag('captcha')->rm($_uni); + return is_string($_val) && strtolower($_val) === strtolower($code); } }