nette / latte

☕ Latte: the safest & truly intuitive templates for PHP. Engine for those who want the most secure PHP sites.
https://latte.nette.org
Other
1.13k stars 109 forks source link

missing end of a HTML tag results in Server error without description what is the problem #329

Closed forgie1 closed 1 year ago

forgie1 commented 1 year ago

Version: 3.0.5

Bug Description

<td><a href="mailto:{$owner->getEmail()}" {$owner->getEmail()}</td> Ends with: Latte\CompileException Thrown exception 'Call to a member function isEnd() on null' (in '....latte')

in file: \vendor\latte\latte\src\Latte\Compiler\TemplateParser.php:89

83:        public function parseFragment(callable $resolver, callable $after = null): FragmentNode
84:        {
85:            $res = new FragmentNode;
86:            $save = [$this->lastResolver, $this->tag];
87:            $this->lastResolver = $resolver;
88:            try {
89:                while (!$this->stream->peek()->isEnd()) {

Expected Behavior

It would be nice if message of the server error would have description that end <a> tag is missing in the specified template