From: Michael Date: Wed, 8 Aug 2018 12:17:49 +0000 (+0000) Subject: Notice in tt fixed that happens with chinese translations X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0c56538cd51b26f245425cd1aab0cd2f7130ada2;p=friendica.git Notice in tt fixed that happens with chinese translations --- diff --git a/src/Core/L10n.php b/src/Core/L10n.php index 7420f98c98..8cdd935917 100644 --- a/src/Core/L10n.php +++ b/src/Core/L10n.php @@ -6,6 +6,7 @@ namespace Friendica\Core; use Friendica\BaseObject; use Friendica\Database\DBA; +use Friendica\Core\System; require_once 'boot.php'; require_once 'include/dba.php'; @@ -193,7 +194,13 @@ class L10n extends BaseObject } else { $i = self::stringPluralSelectDefault($count); } - $s = $t[$i]; + + // for some languages there is only a single array item + if (!isset($t[$i])) { + $s = $t[0]; + } else { + $s = $t[$i]; + } } else { $s = $t; }