diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index d5c18d31a..323cc764d 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -574,7 +574,7 @@ public function compileVariable($variable) )->nocache; // todo $this->template->compiled->properties['variables'][$var] = $this->tag_nocache | $this->nocache; } - return '$_smarty_tpl->tpl_vars[' . $variable . ']->value'; + return '($_smarty_tpl->tpl_vars[' . $variable . ']->value ?? NULL)'; } /**