From d002156f78df70b1c6f128a90ba267aa328b4148 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Wed, 27 Apr 2022 02:16:36 +0800 Subject: [PATCH] fix redundant error logs: can not get any translations --- include/globalfunctions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/globalfunctions.php b/include/globalfunctions.php index bf924d2d..1c27b469 100644 --- a/include/globalfunctions.php +++ b/include/globalfunctions.php @@ -607,10 +607,9 @@ function nexus_trans($key, $replace = [], $locale = null) $getKey = $locale . "." . $key; $result = arr_get($translations, $getKey); if (empty($result) && $locale != 'en') { + do_log("original getKey: $getKey can not get any translations", 'error'); $getKey = "en." . $key; $result = arr_get($translations, $getKey); - } else { - do_log("original getKey: $getKey can not get any translations", 'error'); } if (!empty($replace)) { $search = array_map(function ($value) {return ":$value";}, array_keys($replace));