views:

61

answers:

2

Hello everyone,

I am creating a from using the Zend Framework version 1.10.7. But I am getting an annoying notice of which I want to get Rid. The notice means that somewehere i have a problem with an array. I just can't find out where it is. Any Help, idea's?

     Notice: Array to string conversion in /var/www/Zend/ZendFramework-1.10.7/library/Zend/View/Helper/HtmlElement.php on line 104
Call Stack
#   Time    Memory  Function    Location
1   0.0003  327592  {main}( )   ../index.php:0
2   0.0011  336304  require( '/var/www/nrka2/application/application.php' ) ../index.php:2
3   0.3390  6787492 Zend_Application->run( )    ../application.php:24
4   0.3391  6787492 Zend_Application_Bootstrap_Bootstrap->run( )    ../Application.php:366
5   0.3399  6787564 Zend_Controller_Front->dispatch( )  ../Bootstrap.php:97
6   0.3559  7143808 Zend_Controller_Dispatcher_Standard->dispatch( )    ../Front.php:954
7   0.7416  10514760    Zend_Controller_Action->dispatch( ) ../Standard.php:295
8   0.7429  10520540    Zend_Controller_Action_HelperBroker->notifyPostDispatch( )  ../Action.php:523
9   0.7432  10521780    Zend_Controller_Action_Helper_ViewRenderer->postDispatch( ) ../HelperBroker.php:277
10  0.7438  10521780    Zend_Controller_Action_Helper_ViewRenderer->render( )   ../ViewRenderer.php:957
11  0.7505  10522008    Zend_Controller_Action_Helper_ViewRenderer->renderScript( ) ../ViewRenderer.php:918
12  0.7508  10522008    Zend_View_Abstract->render( )   ../ViewRenderer.php:897
13  0.7512  10563268    Zend_View->_run( )  ../Abstract.php:880
14  0.7515  10564596    include( '/var/www/nrka2/application/modules/eventManager/views/scripts/user/register.phtml' )  ../View.php:108
15  0.7516  10564596    Zend_Form->__toString( )    ../Form.php:0
16  0.7516  10564596    Zend_Form->render( )    ../Form.php:2903
17  0.7554  10565984    Zend_Form_Decorator_FormElements->render( ) ../Form.php:2887
18  0.7982  10778164    Zend_Form_Element->render( )    ../FormElements.php:101
19  0.8043  10780436    Zend_Form_Decorator_ViewHelper->render( )   ../Element.php:2020
20  0.8135  10814136    Zend_View->formText( )  ../ViewHelper.php:246
21  0.8136  10814584    Zend_View_Abstract->__call( )   ../Abstract.php:0
22  0.8139  10814912    call_user_func_array ( )    ../Abstract.php:342
23  0.8139  10815356    Zend_View_Helper_FormText->formText( )  ../Abstract.php:0
24  0.8158  10818276    Zend_View_Helper_HtmlElement->_htmlAttribs( )   ../FormText.php:79
25  0.8161  10818896    implode ( ) ../HtmlElement.php:104

Update:

I found out that this code is causing me trouble:

$this->addElement('text','usr_surname', array(
        'valdators' => array(
            'Alpha',
                array('StringLength',true,array(3,128))
        ),
        'required'  =>  true,
        'label'     => 'lastname',
        'filters'   => array('StringTrim')
        ));
+1  A: 

http://framework.zend.com/issues/browse/ZF-7729

akonsu
have seen it. But i am not using dojo. Have updated my post.
sanders
i suspect that dojo is calling in to the core (where the helper which throws this error is) so the error reproduces with or without dojo.
akonsu
i would try to debug and see what value it is trying to convert.
akonsu
+1  A: 

You've misspelt 'validators':

$this->addElement('text','usr_surname', array(
        'validators' => array(
            'Alpha',
                array('StringLength',true,array(3,128))
        ),
        'required'  =>  true,
        'label'     => 'lastname',
        'filters'   => array('StringTrim')
        ));
Ashley