błąd to :
Kod
Notice: Undefined index: word in ... on line 279
279 to ten kawałek
$captchaWord = $captchaIterator['word'] ;
A o to cały kod
$form = new Zend_Form(); $captcha = new Zend_Form_Element_Captcha( 'captcha', 'captcha' => 'Image', 'wordLen' => 6, 'timeout' => 300, 'font' => 'arial.ttf', 'imgDir' => 'img/captcha/', 'imgUrl' => ''.$this->view->baseUrl.'/img/captcha/', ))); $form->setAction('') ->setMethod('post') ->addElement($captcha) ->addElement('submit','Submit'); $this->view->form = $form; $request = $this->getRequest(); $captcha = $request->getPost('captcha'); $captchaId = $captcha['id']; $captchaInput = $captcha['input']; $captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_'.$captchaId); $captchaIterator = $captchaSession->getIterator(); $captchaWord = $captchaIterator['word'] ; if( $captchaWord ) { if( $captchaInput != $captchaWord ){ } else { } } else { return false; }
Myślę żę kod zrozumiały , bardzo proszę o jakąś radę bo dziwne że kod działa ale wywala błąd no a error_reporting nam sprawy nie załatwi