Search code examples
zend-frameworkzend-formzend-form-elementview-helpers

Error when enabling view helper


I have this view Helper:

$this->addElement('text','evt_amtpersons', array(
     'description'     =>  '<a id="buyCredit" href="/user/register" target="_blank">Dit is een link</a>',
        'filters'   => array('StringTrim', 'StringToLower'),
        'ViewHelper',
            array('Description', array('escape'=>false, 'tag'=>false)),
        'validators'=> array(
            array('StringLength',true,array(1,128)),
        ),
        'required'  => true,
        'label'     => 'aantal hulpverleners',
    ));

Wheb I enable the ViewHelper I get the following error:

Notice: Array to string conversion in K:\xampp\htdocs\nrka2\library\Zend\View\Helper\HtmlElement.php on line 104

Usually it means there is a typo. But I can't find it. I am running the latest version of the ZF (1.11.4) Any idea's?

Tnx.


Solution

  • 'Array to string conversion in K:\xampp\htdocs\nrka2\library\Zend\View\Helper\HtmlElement.php on line 104'

    This is not a typo. This means you're applying a string operation on an array. Are you passing in an array where Zend expects a string? Have a look at line 104