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 git-svn-id: https://develop.svn.wordpress.org/trunk@31371 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2518bbbb1f
commit
afdd7da11b
|
@ -2461,7 +2461,8 @@ class wpdb {
|
|||
}
|
||||
|
||||
// Change the charset to match the string(s) we're converting
|
||||
if ( $charset !== $this->charset ) {
|
||||
if ( $charset !== $connection_charset ) {
|
||||
$connection_charset = $charset;
|
||||
$this->set_charset( $this->dbh, $charset );
|
||||
}
|
||||
|
||||
|
@ -2482,7 +2483,7 @@ class wpdb {
|
|||
|
||||
// Don't forget to change the charset back!
|
||||
if ( $connection_charset !== $this->charset ) {
|
||||
$this->set_charset( $this->dbh, $connection_charset );
|
||||
$this->set_charset( $this->dbh );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue