diff --git a/src/CaptchaController.php b/src/CaptchaController.php index 37fa592..f852b5a 100644 --- a/src/CaptchaController.php +++ b/src/CaptchaController.php @@ -12,9 +12,8 @@ namespace think\captcha; use think\Config; -use think\Controller; -class CaptchaController extends Controller +class CaptchaController { public function index($id = "") { diff --git a/src/helper.php b/src/helper.php index dd0b407..555077c 100644 --- a/src/helper.php +++ b/src/helper.php @@ -35,7 +35,7 @@ function captcha($id = "", $config = []) */ function captcha_src($id = "") { - return \think\Url::build('/captcha' . $id ? "/{$id}" : ''); + return \think\Url::build('/captcha' . ($id ? "/{$id}" : '')); }