$template = new myPHPTAL('index.html');
...
try {
$layout -> set('content', $template->execute() );
echo $layout->execute();
)
catch {
smth like mail to me
}
What I found is that if I have index.html like below (yes just a HTML comment, nothing else!)
<!-- -->
that makes the whole engine to fail with some fatal exception in PHPTAL class (sorry did not save it).
The whole catch block with PHP 82 and latest PHPTAL will not execute, will crash (not even triggering catch block but maybe it is poorly written - my bad). Replacing a comment with <span></span> would make my site working again!
It used to work with PHP 5.6 and 1.3.1 PHPTAL but just upgrading to latest + PHP 8.2 made the site crash due to this "template made of a comment".
Hi
Nasty code I wrote ages ago is
What I found is that if I have index.html like below (yes just a HTML comment, nothing else!)
<!-- -->
that makes the whole engine to fail with some fatal exception in PHPTAL class (sorry did not save it).The whole catch block with PHP 82 and latest PHPTAL will not execute, will crash (not even triggering catch block but maybe it is poorly written - my bad). Replacing a comment with
<span></span>
would make my site working again!It used to work with PHP 5.6 and 1.3.1 PHPTAL but just upgrading to latest + PHP 8.2 made the site crash due to this "template made of a comment".
Should not behave like that?