Fix error in Icinga\Web\Form in case the label decorator is missing
Zend_Form::getDecorator() returns false instead of null in case the decorator is not found.
This commit is contained in:
parent
1ee873adfc
commit
94d727dbb8
|
@ -512,7 +512,7 @@ class Form extends Zend_Form
|
|||
|
||||
$el = parent::createElement($type, $name, $options);
|
||||
|
||||
if (($description = $el->getDescription()) !== null && ($label = $el->getDecorator('label')) !== null) {
|
||||
if (($description = $el->getDescription()) !== null && ($label = $el->getDecorator('label')) !== false) {
|
||||
$label->setOptions(array(
|
||||
'title' => $description,
|
||||
'class' => 'has-feedback'
|
||||
|
|
Loading…
Reference in New Issue