Form: Be less error-prone while calling array_search
This commit is contained in:
parent
5345831742
commit
6c105b867e
|
@ -840,7 +840,7 @@ class Form extends Zend_Form
|
|||
}
|
||||
|
||||
$decorators = $el->getDecorators();
|
||||
$pos = array_search('Zend_Form_Decorator_ViewHelper', array_keys($decorators)) + 1;
|
||||
$pos = array_search('Zend_Form_Decorator_ViewHelper', array_keys($decorators), true) + 1;
|
||||
$el->setDecorators(
|
||||
array_slice($decorators, 0, $pos, true)
|
||||
+ array('autosubmit' => $autosubmitDecorator)
|
||||
|
|
Loading…
Reference in New Issue