From 1bf15da86343b8213a8554fcf3cda78a9000b455 Mon Sep 17 00:00:00 2001 From: c39cfbb3 <145777845+c39cfbb3@users.noreply.github.com> Date: Sun, 15 Oct 2023 00:33:42 +0800 Subject: Update lib/private/L10N/Factory.php Co-authored-by: Ferdinand Thiessen Signed-off-by: c39cfbb3 <145777845+c39cfbb3@users.noreply.github.com> --- lib/private/L10N/Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private/L10N') diff --git a/lib/private/L10N/Factory.php b/lib/private/L10N/Factory.php index 7361ab1a9dd..6de620e7ec7 100644 --- a/lib/private/L10N/Factory.php +++ b/lib/private/L10N/Factory.php @@ -495,7 +495,7 @@ class Factory implements IFactory { if ($preferred_language === strtolower($available_language)) { return $this->respectDefaultLanguage($app, $available_language); } - if ($preferred_language_parts[0].'_'.$preferred_language_parts[count($preferred_language_parts) - 1] === strtolower($available_language)) { + if ($preferred_language_parts[0].'_'.end($preferred_language_parts) === strtolower($available_language)) { return $available_language; } } -- cgit v1.2.3