Skip to content

Commit

Permalink
Merge pull request #25015 from nextcloud/fix/no-double-intl-polyfill
Browse files Browse the repository at this point in the history
Replace patchwork/utf8 with symfony-polyfill-*
  • Loading branch information
rullzer authored Jan 8, 2021
2 parents 741e5e2 + 287c26b commit d13f2d9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 130 files
3 changes: 1 addition & 2 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,7 @@ public static function init() {
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')) {
Expand Down
8 changes: 7 additions & 1 deletion lib/private/legacy/OC_Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,13 @@ public function isHtaccessWorking(\OCP\IConfig $config) {
* @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;
}
Expand Down

0 comments on commit d13f2d9

Please sign in to comment.