- // if $to is empty, strtr() could return a wrong result
- if ( count( $u ) == 1 && $to && in_array( $v, $variants ) ) {
+ // if $to is empty (which is also used as $from in bidtable),
+ // strtr() could return a wrong result.
+ if ( count( $u ) == 1 && $to !== '' && in_array( $v, $variants ) ) {