Skip to content

Commit

Permalink
Check $sessionData is an array in Mage_Captcha_Model_Zend (#2804)
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Dec 13, 2022
1 parent 88ff1d4 commit f989cf8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/code/core/Mage/Captcha/Model/Zend.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,14 @@ protected function _getTargetForms()
/**
* Get captcha word
*
* @return string
* @return string|null
*/
public function getWord()
{
$sessionData = $this->getSession()->getData($this->_getFormIdKey(self::SESSION_WORD));
if (!is_array($sessionData)) {
return null;
}
return time() < $sessionData['expires'] ? $sessionData['data'] : null;
}

Expand Down

0 comments on commit f989cf8

Please sign in to comment.