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


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:

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'))) {
             } else {


Fixed the formatting of the patch text

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

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


Later I will fix this issue.


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