Make WordPress Core


Ignore:
Timestamp:
02/09/2015 12:33:32 AM (10 years ago)
Author:
pento
Message:

WPDB: When we're removing invalid text text from strings with multiple different character sets, wpdb::strip_invalid_text() wasn't correctly switching connection character sets.

Fixes #31262

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r31349 r31371  
    24622462
    24632463                // Change the charset to match the string(s) we're converting
    2464                 if ( $charset !== $this->charset ) {
     2464                if ( $charset !== $connection_charset ) {
     2465                    $connection_charset = $charset;
    24652466                    $this->set_charset( $this->dbh, $charset );
    24662467                }
     
    24832484            // Don't forget to change the charset back!
    24842485            if ( $connection_charset !== $this->charset ) {
    2485                 $this->set_charset( $this->dbh, $connection_charset );
     2486                $this->set_charset( $this->dbh );
    24862487            }
    24872488        }
Note: See TracChangeset for help on using the changeset viewer.