Skip to content

Commit

Permalink
Regression 3.7: last template style preview not working #1 (joomla#13775
Browse files Browse the repository at this point in the history
)

* Update site.php

* Update site.php

* Update site.php

* Update site.php

* Move unset into the else condition
  • Loading branch information
JoeforJoomla Boy authored and wilsonge committed Feb 2, 2017
1 parent 0d6a55a commit 4b32be7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libraries/cms/application/site.php
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 4b32be7

Please sign in to comment.