diff options
author | Mario <mario@mariovavti.com> | 2021-03-03 12:39:41 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2021-03-03 14:11:29 +0100 |
commit | 3d264f5a55f340e3c20c1181c8b4578abecf3f1c (patch) | |
tree | 6c5eba25568a65e7317588717df048042a45685a /include/language.php | |
parent | fbb1d6aa41d9eb7a27b4a8bc79747ac0797db0c7 (diff) | |
download | volse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.tar.gz volse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.tar.bz2 volse-hubzilla-3d264f5a55f340e3c20c1181c8b4578abecf3f1c.zip |
php8: fix warnings during install procedure
(cherry picked from commit 48bae9d4219735bc44f4ee72228d19d3e6b9efc9)
Diffstat (limited to 'include/language.php')
-rw-r--r-- | include/language.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/include/language.php b/include/language.php index 622b9614d..d291deb63 100644 --- a/include/language.php +++ b/include/language.php @@ -77,7 +77,7 @@ function get_best_language() { if(! isset($preferred)) { /* - * We could find no perfect match for any of the preferred languages. + * We could find no perfect match for any of the preferred languages. * For cases where the preference is fr-fr and we have fr but *not* fr-fr * run the test again and only look for the language base * which should provide an interface they can sort of understand @@ -262,11 +262,15 @@ function tt($singular, $plural, $count, $ctx = ''){ * @return string */ function ta($k){ + $t = null; - $t = App::$strings[$k]; - if (is_array($t)) - $t = implode("/", $t); - return ($t == "" ? $k : $t); + if(isset(App::$strings[$k])) + $t = App::$strings[$k]; + + if (is_array($t)) + $t = implode("/", $t); + + return ($t == "" ? $k : $t); } /** |