Skip to content

Commit

Permalink
allow integers and floats to become text nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes committed Jun 26, 2019
1 parent 37829b9 commit 211d52b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fhtml/_FHtmlTemplateTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private function _addStructRecursive ($node, FHtml $pointer, array $arguments, a
$pointer->tpl($ret, $arguments);
return;
}
if (is_string($node)) {
if (is_string($node) || is_int($node) || is_float($node)) {
if ($pointer->curNode instanceof HtmlContainerElement)
$pointer->curNode->add(new TextNode($node));
return;
Expand Down

0 comments on commit 211d52b

Please sign in to comment.