From cd158566d02f37a6cb185bdb313a0d2b21bdbc1a Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Tue, 31 Jan 2023 14:48:41 +0100 Subject: [PATCH] Load compiled object in template constructor so it will be cached. --- src/Template.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Template.php b/src/Template.php index 82a782de..596b07ed 100644 --- a/src/Template.php +++ b/src/Template.php @@ -131,7 +131,8 @@ class Template extends TemplateBase { // Template resource $this->template_resource = $template_resource; - $this->setSource($_isConfig ? Config::load($this) : Source::load($this)); + $this->source = $_isConfig ? Config::load($this) : Source::load($this); + $this->compiled = Compiled::load($this); if ($smarty->security_policy) { $smarty->security_policy->registerCallBacks($this);