ZF-11807: Zend_Form_Element getDecorator showing NOTICES

Issue Type: Bug Created: 2011-10-07T19:40:18.000+0000 Last Updated: 2011-10-07T19:40:18.000+0000 Status: Open Fix version(s): Reporter: Gildonei Mendes Anacleto Junior (gildonei) Assignee: Christian Albrecht (alab) Tags: - Zend_Form

  • Zend_Form_Element
  • getDecorator

Related issues: Attachments:


I added a Custon Decorator to an element and when I outputted the form I got some notices

"Warning: Illegal offset type in isset or empty in /var/www/project/library/Zend/Form/Element.php on line 1932 Notice: Array to string conversion in /var/www/project/library/Zend/Form/Element.php on line 1933 Warning: substr_compare() expects parameter 2 to be string, array given in /var/www/project/library/Zend/Form/Element.php on line 1939"

$element->addDecorator(array('row' => 'HtmlTag'), array('tag' => 'div', 'id' => 'user_content','class' => 'content colunas3', 'openOnly' => true));

Debbuging I solved this problem adding a verification of type on "getDecorator" method available in Zend_Form_Element

" public function getDecorator($name) { if (is_array($name)) { $name = $name[key($name)]; } ... "


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.