Fixed renderPushTemplate may not reset the language as expected

Xon

Well-known member
Affected version
2.1.3
In renderPushTemplate;
PHP:
$this->templater->setLanguage($this->language);

$pushContent = $this->templater->renderTemplate($template, $params);

$this->templater->setLanguage($originalLang);

If renderTemplate throws, due to the lack of a try ... finally block, the language is left as the receivers.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.4).

Change log:
Move restoration of original language and style after push template render to finally block
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom