Ticket #32051: 32051.diff
File 32051.diff, 1.4 KB (added by , 10 years ago) |
---|
-
src/wp-includes/wp-db.php
2534 2534 2535 2535 if ( $db_check_string ) { 2536 2536 $queries = array(); 2537 foreach ( $data as $col => $value ) {2537 foreach ( $data as $col => &$value ) { 2538 2538 if ( ! empty( $value['db'] ) ) { 2539 2539 if ( ! isset( $queries[ $value['charset'] ] ) ) { 2540 2540 $queries[ $value['charset'] ] = array(); … … 2542 2542 2543 2543 // Split the CONVERT() calls by charset, so we can make sure the connection is right 2544 2544 $queries[ $value['charset'] ][ $col ] = $this->prepare( "CONVERT( %s USING {$value['charset']} )", $value['value'] ); 2545 unset( $value['db'] ); 2545 2546 } 2546 2547 } 2547 2548 -
tests/phpunit/tests/db/charset.php
59 59 'charset' => 'koi8r', 60 60 'value' => "\xfdord\xf2ress", 61 61 'expected' => "\xfdord\xf2ress", 62 'db' => true63 62 ), 64 63 'hebrew' => array( 65 64 // hebrew needs to be checked in MySQL, too … … 66 65 'charset' => 'hebrew', 67 66 'value' => "\xf9ord\xf7ress", 68 67 'expected' => "\xf9ord\xf7ress", 69 'db' => true70 68 ), 71 69 'false' => array( 72 70 // false is a column with no character set (ie, a number column)