We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Little bug in tagHtml() example

Hi

There is a little bug in the tagHtml() example here: https://docs.phalcon.io/en/latest/reference/tags.html#html5-elements-generic-html-helper

It says:

echo $this->tag->tagHtml("canvas", array("id" => "canvas1", "width" => "300", "class" => "cnvclass", false, true, true));

And should be:

echo $this->tag->tagHtml("canvas", array("id" => "canvas1", "width" => "300", "class" => "cnvclass"), false, true, true);

If you try to render it with the oryginal code, you won't get eol after the tag. That suggest that last three arguments shoul be outside 2nd argument's array.

yes it is typo in DOC

public static string tagHtml (string $tagName, [array $parameters], [boolean $selfClose], [boolean $onlyStart],[boolean $useEol])



2.2k

My pleasure :)