From 9ff51aafc518460e6c45996f09e9fe74e5f8d2e8 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 25 Jan 2018 22:26:47 +0100 Subject: Use index based string access for substr with length of 1 Signed-off-by: Morris Jobke --- lib/private/Settings/Personal/PersonalInfo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/Settings') diff --git a/lib/private/Settings/Personal/PersonalInfo.php b/lib/private/Settings/Personal/PersonalInfo.php index dbc05cbda2f..ad277b43194 100644 --- a/lib/private/Settings/Personal/PersonalInfo.php +++ b/lib/private/Settings/Personal/PersonalInfo.php @@ -208,7 +208,7 @@ class PersonalInfo implements ISettings { $l = \OC::$server->getL10N('settings', $lang); // TRANSLATORS this is the language name for the language switcher in the personal settings and should be the localized version $potentialName = (string) $l->t('__language_name__'); - if($l->getLanguageCode() === $lang && substr($potentialName, 0, 1) !== '_') {//first check if the language name is in the translation file + if($l->getLanguageCode() === $lang && $potentialName[0] !== '_') {//first check if the language name is in the translation file $ln = array('code' => $lang, 'name' => $potentialName); } elseif ($lang === 'en') { $ln = ['code' => $lang, 'name' => 'English (US)']; -- cgit v1.2.3