Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/Captcha' of https://github.com/sasezaki/zf2 into…
Browse files Browse the repository at this point in the history
… hotfix/validator-captcha-http_refactor
  • Loading branch information
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/AbstractAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public function setOption($key, $value)
* @param array $options
* @return Zend_Form_Element
*/
public function setOptions($options = null)
public function setOptions(array $options = null)
{
foreach ($options as $key => $value) {
$this->setOption($key, $value);
Expand Down
8 changes: 4 additions & 4 deletions src/Word.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,20 +388,20 @@ public function isValid($value, $context = null)
}

if (!isset($value['input'])) {
$this->_error(self::MISSING_VALUE);
$this->error(self::MISSING_VALUE);
return false;
}
$input = strtolower($value['input']);
$this->_setValue($input);
$this->setValue($input);

if (!isset($value['id'])) {
$this->_error(self::MISSING_ID);
$this->error(self::MISSING_ID);
return false;
}

$this->_id = $value['id'];
if ($input !== $this->getWord()) {
$this->_error(self::BAD_CAPTCHA);
$this->error(self::BAD_CAPTCHA);
return false;
}

Expand Down

0 comments on commit 184c175

Please sign in to comment.