nette/latte

Some PHP functions used in {do} are namespace\ prefixed in latte cache file, resulting in Error

forgie1 opened this issue · 2 comments

Version: 3.0.4

Bug Description

For example PHP function unset() can not be called in {do} macro:

Error
Call to undefined function unset(), did you mean reset()?

In Latte Cache file it is prefixed : namespace\unset($abc).

Steps To Reproduce

{do unset($abc)}

Expected Behavior

$abc is unset.

dg commented

I'll find out why this is happening, however to use unset you need to install RawPhpExtension.

See https://latte.nette.org/en/syntax#toc-php-limitations-in-latte

Thank you