Fix isset(), unset() and empty() not working in template syntax

This commit is contained in:
Kijin Sung 2022-02-16 13:15:31 +09:00
parent 60b7912718
commit 0c31234e09

View file

@ -635,7 +635,7 @@ class TemplateHandler
// {@ ... } or {$var} or {func(...)}
if($m[1])
{
if(preg_match('@^(\w+)\(@', $m[1], $mm) && !function_exists($mm[1]))
if(preg_match('@^(\w+)\(@', $m[1], $mm) && (!function_exists($mm[1]) && !in_array($mm[1], ['isset', 'unset', 'empty'])))
{
return $m[0];
}