Wrap iconv usage in function_exists for compatibility.
This commit is contained in:
parent
c24faa8ab4
commit
1664181a63
|
@ -1561,8 +1561,10 @@ function wc_uasort_comparison( $a, $b ) {
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function wc_ascii_uasort_comparison( $a, $b ) {
|
function wc_ascii_uasort_comparison( $a, $b ) {
|
||||||
$aconv = iconv( 'UTF-8', 'ASCII//TRANSLIT', $a );
|
if ( function_exists( 'iconv' ) ) {
|
||||||
$bconv = iconv( 'UTF-8', 'ASCII//TRANSLIT', $b );
|
$a = iconv( 'UTF-8', 'ASCII//TRANSLIT', $a );
|
||||||
|
$b = iconv( 'UTF-8', 'ASCII//TRANSLIT', $b );
|
||||||
|
}
|
||||||
return strcmp( $aconv, $bconv );
|
return strcmp( $aconv, $bconv );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue