From 7fa710b6d2c50b2b624d496c4522674fb00cd9c0 Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Wed, 28 Apr 2021 00:07:42 +0800 Subject: [PATCH] Fix null translations --- Service/Generator.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Service/Generator.php b/Service/Generator.php index 1321b38..02da71d 100644 --- a/Service/Generator.php +++ b/Service/Generator.php @@ -137,6 +137,8 @@ class Generator $all_terms = $matches[1]; foreach ($all_terms as $term) { + if ($term == null) + continue; $final_text = str_replace('[' . $term . ']', $this->translator->trans($term), $final_text); }