The code seems to use the I18n::locale()
if the param lang
is empty, but the ConfigValidator doesn't allow us to set an empty string
#2
Labels
The code seems to use the
I18n::locale()
https://github.com/cakephp-fr/recaptcha/blob/master/src/View/Helper/RecaptchaHelper.php#L64-L67 if the paramlang
is empty (btw it's really a good idea), but theConfigValidator
doesn't like when we don't specify anylang
option : https://github.com/cakephp-fr/recaptcha/blob/master/src/Validation/ConfigValidator.php#L93-L98Also, maybe set the
lang
param to be empty by default or to use theI18n::locale()
? https://github.com/cakephp-fr/recaptcha/blob/master/src/View/Helper/RecaptchaHelper.php#L40Also, we probably should do a
substr(I18n::locale(), 0, 2))
to get theI18n::locale()
value because the locale value withI18n::locale()
can also be full named such asfr_FR
,en_US
etc.Edit :
After some more tests, by removing the
lang
option in the config, the validator pass, but the option is defined toen
: https://github.com/cakephp-fr/recaptcha/blob/master/src/View/Helper/RecaptchaHelper.php#L40 so the condition :is always
false
.The text was updated successfully, but these errors were encountered: