Skip to content

Commit e908adb

Browse files
committed
add check on text label on checkboxField to avoit to break render
1 parent 240a8c8 commit e908adb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/templates/Mouf/Html/Widgets/Form/CheckboxField__inline.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
$input = $object->getInput();
44
$label = $object->getLabel();
55
$text = $label->getChildren();
6-
$text = $text[0];
6+
if (count($text) > 0) {
7+
$text = $text[0];
8+
}
79
$label->setChildren([$input]);
8-
$label->addChild($text);
10+
if ($text !== null) {
11+
$label->addChild($text);
12+
}
913
$label->addClass("checkbox-inline");
1014
$label->toHtml();

0 commit comments

Comments
 (0)