Issues

ZF-11151: PHP Notice: Undefined variable: show in Zend\Form\Decorator\FormErrors.php on line 357

Issue Type: Bug Created: 2011-03-09T08:03:35.000+0000 Last Updated: 2011-04-10T16:07:14.000+0000 Status: Resolved Fix version(s): - 1.11.6 (05/May/11)

Reporter: jah (jahra) Assignee: Ramon Henrique Ornelas (ramon) Tags: - Zend_Form

Related issues: - ZF-9954

Attachments:

Description

There's a typo in Zend_Form_Decorator_FormErrors::getShowCustomFormErrors which generates a Notice level PHP message when getShowCustomFormErrors is called and the showCustomFormErrors options has been provided to the FormErrors decorator.

To reproduce, create a Zend_Form and add the FormErrors decorator: array('FormErrors', array('showCustomFormErrors' => true))

This issue exists, for certain, in 1.11.3; it is present in svn trunk at r23798 and so must also exist in 1.11.4 - it likely exists in previous versions too.

patch against latest trunk:

<pre class="literal">
Index: Form/Decorator/FormErrors.php
===================================================================
--- Form/Decorator/FormErrors.php   (revision 23798)
+++ Form/Decorator/FormErrors.php   (working copy)
@@ -351,7 +351,7 @@
     public function getShowCustomFormErrors()
     {
         if (null === $this->_showCustomFormErrors) {
-            if (null === ($how =  $this->getOption('showCustomFormErrors'))) {
+            if (null === ($show = $this->getOption('showCustomFormErrors'))) {
                 $this->setShowCustomFormErrors($this->_defaults['showCustomFormErrors']);
             } else {
                 $this->setShowCustomFormErrors($show);

Comments

Posted by jah (jahra) on 2011-03-09T08:07:33.000+0000

Fixed the formatting of the patch text

Posted by jah (jahra) on 2011-03-09T08:29:15.000+0000

I realise now that I supplied a patch for this issue in the related ZF-9954 so I've linked these issues.

Posted by jah (jahra) on 2011-03-25T15:31:47.000+0000

Hi Ramon, Is there anything I can do to help close this issue? Best, jah

Posted by Ramon Henrique Ornelas (ramon) on 2011-03-25T15:49:55.000+0000

@jah

Later I will fix this issue.

Thanks

Posted by Ramon Henrique Ornelas (ramon) on 2011-04-10T16:07:14.000+0000

Fixed in trunk r23852 merged to branch release 1.11 r23853 - thanks

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts