mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
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();
|
$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(
|
$el->setDecorators(
|
||||||
array_slice($decorators, 0, $pos, true)
|
array_slice($decorators, 0, $pos, true)
|
||||||
+ array('autosubmit' => $autosubmitDecorator)
|
+ array('autosubmit' => $autosubmitDecorator)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user