diff options
Diffstat (limited to 'lib/Minz/Translate.php')
| -rw-r--r-- | lib/Minz/Translate.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Minz/Translate.php b/lib/Minz/Translate.php index e4c1020d5..0d704a85f 100644 --- a/lib/Minz/Translate.php +++ b/lib/Minz/Translate.php @@ -133,8 +133,8 @@ class Minz_Translate { } $list_i18n_files = array_values(array_diff( - scandir($lang_path), - array('..', '.') + scandir($lang_path) ?: [], + ['..', '.'] )); // Each file basename correspond to a top-level i18n key. For each of @@ -199,8 +199,7 @@ class Minz_Translate { // If $translates[$top_level] is null it means we have to load the // corresponding files. - if (!isset(self::$translates[$top_level]) || - is_null(self::$translates[$top_level])) { + if (empty(self::$translates[$top_level])) { $res = self::loadKey($top_level); if (!$res) { return $key; |
