From 0c56538cd51b26f245425cd1aab0cd2f7130ada2 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 8 Aug 2018 12:17:49 +0000 Subject: [PATCH] Notice in tt fixed that happens with chinese translations --- src/Core/L10n.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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; }