Swap flag around to ensure it tries TRANSLIT first, also silence notices should they pop up for some reason

This commit is contained in:
Gerhard 2019-04-18 09:51:14 +02:00
parent bedde9377c
commit f87df5c95a
1 changed files with 2 additions and 2 deletions

View File

@ -1624,8 +1624,8 @@ function wc_uasort_comparison( $a, $b ) {
*/
function wc_ascii_uasort_comparison( $a, $b ) {
if ( function_exists( 'iconv' ) && defined( 'ICONV_IMPL' ) && @strcasecmp( ICONV_IMPL, 'unknown' ) !== 0 ) {
$a = iconv( 'UTF-8', 'ASCII//IGNORE//TRANSLIT', $a );
$b = iconv( 'UTF-8', 'ASCII//IGNORE//TRANSLIT', $b );
$a = @iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $a );
$b = @iconv( 'UTF-8', 'ASCII//TRANSLIT//IGNORE', $b );
}
return strcmp( $a, $b );
}