diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-01-08 08:25:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 08:25:31 +0100 |
commit | d13f2d984f8ed5ef5bc445ad093cd9eb4def8a04 (patch) | |
tree | 60db7220d09911bdf1d1492987405178586cb282 /lib | |
parent | 741e5e273bd91ccf2c11b255cd0fee37d3832ec5 (diff) | |
parent | 287c26bda3f184e90c9b608466e4165a1b0942b6 (diff) | |
download | nextcloud-server-d13f2d984f8ed5ef5bc445ad093cd9eb4def8a04.tar.gz nextcloud-server-d13f2d984f8ed5ef5bc445ad093cd9eb4def8a04.zip |
Merge pull request #25015 from nextcloud/fix/no-double-intl-polyfill
Replace patchwork/utf8 with symfony-polyfill-*
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 3 | ||||
-rw-r--r-- | lib/private/legacy/OC_Util.php | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/base.php b/lib/base.php index 82a9c28c35e..f5b9964b1f8 100644 --- a/lib/base.php +++ b/lib/base.php @@ -624,8 +624,7 @@ class OC { self::handleAuthHeaders(); self::registerAutoloaderCache(); - // initialize intl fallback is necessary - \Patchwork\Utf8\Bootup::initIntl(); + // initialize intl fallback if necessary OC_Util::isSetLocaleWorking(); if (!defined('PHPUNIT_RUN')) { diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php index 826d0a31129..4176dfbb229 100644 --- a/lib/private/legacy/OC_Util.php +++ b/lib/private/legacy/OC_Util.php @@ -1293,7 +1293,13 @@ class OC_Util { * @return bool */ public static function isSetLocaleWorking() { - \Patchwork\Utf8\Bootup::initLocale(); + if ('' === basename('§')) { + // Borrowed from \Patchwork\Utf8\Bootup::initLocale + setlocale(LC_ALL, 'C.UTF-8', 'C'); + setlocale(LC_CTYPE, 'en_US.UTF-8', 'fr_FR.UTF-8', 'es_ES.UTF-8', 'de_DE.UTF-8', 'ru_RU.UTF-8', 'pt_BR.UTF-8', 'it_IT.UTF-8', 'ja_JP.UTF-8', 'zh_CN.UTF-8', '0'); + } + + // Check again if ('' === basename('§')) { return false; } |