X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=231b63f65bc5df8470aaeb79fe6b1864649a2a68;hb=7eb0a832018621b3662f9fb5c45c0a67f5936088;hp=30e49cbb916bd51f0d8fd93aa721396f0147ff54;hpb=7b63e4ca09f58b3b056bd2b8f2d8a4157537f274;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 30e49cbb..231b63f6 100644 --- a/index.php +++ b/index.php @@ -1218,11 +1218,12 @@ function renderPage() uksort($tags, function($a, $b) { // Collator is part of PHP intl. if (class_exists('Collator')) { - $c = new Collator(setlocale(LC_ALL, 0)); - return $c->compare($a, $b); - } else { - return strcasecmp($a, $b); + $c = new Collator(setlocale(LC_COLLATE, 0)); + if (!intl_is_failure(intl_get_error_code())) { + return $c->compare($a, $b); + } } + return strcasecmp($a, $b); }); $tagList=array();