Steffen
Well-known member
- Affected version
- 2.3.2
First of all, thank you for the german umlaut preservation in URLs in XenForo 2.3 explained here: https://xenforo.com/community/threa...haracters-such-as-o-and-u.221332/post-1681545
However, there seems to be a small but crucial bug which causes the special-casing to not be used. The code expects the locale separator to be and underscore (i.e. "de_DE") although actually it is a dash ("de-DE").
However, there seems to be a small but crucial bug which causes the special-casing to not be used. The code expects the locale separator to be and underscore (i.e. "de_DE") although actually it is a dash ("de-DE").
Diff:
--- a/src/XF/Util/Str.php
+++ b/src/XF/Util/Str.php
@@ -385,7 +385,7 @@ class Str
protected static function getLocale(string $languageCode): string
{
- $parentLocale = strrchr($languageCode, '_');
+ $parentLocale = strrchr($languageCode, '-');
if (!$parentLocale)
{