Form: Be less error-prone while calling array_search

This commit is contained in:
Johannes Meyer 2015-07-31 11:05:09 +02:00
parent 5345831742
commit 6c105b867e
1 changed files with 1 additions and 1 deletions

View File

@ -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)