diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 15:40:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-26 15:40:44 +0100 |
commit | 4c38d1ed01a180b2c086571ab1b6167c173c203b (patch) | |
tree | c0f5ffb382534fb468193f453499aa69c4aa5cf9 /lib/private/Settings | |
parent | ca493ab5b1288d53f203d74117a8e636a606e633 (diff) | |
parent | 9ff51aafc518460e6c45996f09e9fe74e5f8d2e8 (diff) | |
download | nextcloud-server-4c38d1ed01a180b2c086571ab1b6167c173c203b.tar.gz nextcloud-server-4c38d1ed01a180b2c086571ab1b6167c173c203b.zip |
Merge pull request #8054 from nextcloud/substr-use-index
Use index based string access for substr with length of 1
Diffstat (limited to 'lib/private/Settings')
-rw-r--r-- | lib/private/Settings/Personal/PersonalInfo.php | 2 |
1 files changed, 1 insertions, 1 deletions
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)']; |