From 4b32be7ebca802e2e6a8fe1bed444a61faa15c04 Mon Sep 17 00:00:00 2001 From: JoeforJoomla Boy Date: Thu, 2 Feb 2017 14:26:22 +0100 Subject: [PATCH] Regression 3.7: last template style preview not working #1 (#13775) * Update site.php * Update site.php * Update site.php * Update site.php * Move unset into the else condition --- libraries/cms/application/site.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libraries/cms/application/site.php b/libraries/cms/application/site.php index daf33a2ce734c..ff95aa359f115 100644 --- a/libraries/cms/application/site.php +++ b/libraries/cms/application/site.php @@ -497,6 +497,9 @@ public function getTemplate($params = false) $template->params = new Registry($template->params); } + // Unset the $template reference to the last $templates[n] item cycled in the foreach above to avoid editing it later + unset($template); + // Add home element, after loop to avoid double execution if (isset($template_home)) {