I'm sorry that I do not remember which part of my app triggered the error. It was fatal, so there wasn't much of a stacktrace either.
I just reverted the code and went on after reporting it. If it is really important to you, I can put the erroneous code back and try to reproduce it.
Just not tonight :-)
-Bart

Op 22-4-2010 21:27, Christian Albrecht schreef:
Indeed that was me, good to know that this resolves the problem :)
Beeing curios, what exactly made this fail? I didn't imagine someone
would give an multidimensional associative array with second level
key 'callback' as an attribute to a Form Element.
Greetings, Christian

  
I can see that you or someone else already added a fix. That was quick!
Good check to is_callable.

For those interested, this is the new code:

             if (is_array($val)) {
                 if (array_key_exists('callback', $val)
&& is_callable($val['callback'])) {
                     $val = $val['callback']($this);
                 } else {
                     $val = implode(' ', $val);
                 }
             }

-Bart

Op 22-4-2010 18:29, Christian Albrecht schreef:
    
Hey Bart,
that was me who inserted this lines, see
http://framework.zend.com/issues/browse/ZF-6741
what is your setup that this fails? Maybe that i can fix it properly.
Greetings, Christian

      
This used to work in revision 21963, where the code was simpler in that
particular line.

Lamba_13 seems to be the function that is missing. Anyone has forgotten
a commit? Otherwise I will have to revert to previous version.

New code:
                 if (array_key_exists('callback', $val)) {
                 
                     $val = $val['callback']($this);
                 
                 } else {
                 
                     $val = implode(' ', $val);
                 
                 }

Old code (working)

                 $val = implode(' ', $val);

Looks to me as if less code was better :-)

-Bart

Bart McLeod schreef:
        
Call to undefined function () in
*D:\ZendFramework\library\Zend\Form\Decorator\HtmlTag.php* on line *88

*Anyone encountered this one? It occurs after update from svn this
morning. (GMT +1)

Bart McLeod*


*
          

  

--
Bart McLeod
Space Web
Middenlaan 47
6865 VN Heveadorp
The Netherlands
t +31(0)26 3392952
m 06 51 51 89 71
@ [email protected]
www.spaceweb.nl
zce logozce PHP 5 logo zce Zend Framework logo

Bart McLeod is a Zend Certified Engineer.

Click to verify!

Reply via email to