From 6c105b867e66112d0c317cb2ecfa2457eab4bda1 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 31 Jul 2015 11:05:09 +0200 Subject: [PATCH] Form: Be less error-prone while calling array_search --- library/Icinga/Web/Form.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Web/Form.php b/library/Icinga/Web/Form.php index 7bb0e7a48..2730f6998 100644 --- a/library/Icinga/Web/Form.php +++ b/library/Icinga/Web/Form.php @@ -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)