Skip to content

Commit 833cae4

Browse files
authored
Merge pull request #19 from thecodingmachine/5.1
Backporting to 5.2
2 parents e260bb9 + b8bd7b4 commit 833cae4

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)