From b6e1a4589a428a4dc20455c602e20d1ef9e137d5 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Thu, 22 Jun 2023 21:55:25 +0900 Subject: [PATCH] Fix #2131 missing translations --- classes/template/TemplateHandler.class.php | 2 +- tests/unit/classes/TemplateHandlerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/template/TemplateHandler.class.php b/classes/template/TemplateHandler.class.php index ed717c71d..851e21049 100644 --- a/classes/template/TemplateHandler.class.php +++ b/classes/template/TemplateHandler.class.php @@ -1049,7 +1049,7 @@ class TemplateHandler { if (preg_match('/^\$[\\\\\w\[\]\'":>-]+$/i', $str)) { - $str = "$str ?? ''"; + $str = preg_match('/^\$lang->/', $str) ? $str : "$str ?? ''"; } switch($escape_option) diff --git a/tests/unit/classes/TemplateHandlerTest.php b/tests/unit/classes/TemplateHandlerTest.php index 2bff4a567..41e587fe0 100644 --- a/tests/unit/classes/TemplateHandlerTest.php +++ b/tests/unit/classes/TemplateHandlerTest.php @@ -211,7 +211,7 @@ class TemplateHandlerTest extends \Codeception\TestCase\Test // issue 512 - ignores array( '
{$lang->sl_show_topimgtext}
', - '?>
sl_show_topimgtext ?? \'\' ?>
' + '?>
sl_show_topimgtext ?>
' ), // issue 584 array(