From 0cb34f33b05266956bae15c11059c0566c06e17d Mon Sep 17 00:00:00 2001 From: waldermort Date: Tue, 13 Jan 2015 20:16:15 +0800 Subject: [PATCH] Fix: Numeric bypass code defaults to integer type When adding a numeric only bypass code into config.yml, it is treated as an integer which causes validation to fail. A workaround is to surround the parameter with double quotes but many users may not be aware of this. This fix will explicitly convert it to a string. --- Validator/CaptchaValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validator/CaptchaValidator.php b/Validator/CaptchaValidator.php index 4469cec..2c4485f 100644 --- a/Validator/CaptchaValidator.php +++ b/Validator/CaptchaValidator.php @@ -60,7 +60,7 @@ class CaptchaValidator $this->session = $session; $this->key = $key; $this->invalidMessage = $invalidMessage; - $this->bypassCode = $bypassCode; + $this->bypassCode = (string)$bypassCode; $this->humanity = $humanity; }