WPDB: When sanity checking a string, check that it's a string, first - PHP notices can occur if an array or object is handled like a string.
See #21212 Built from https://develop.svn.wordpress.org/trunk@31094 git-svn-id: http://core.svn.wordpress.org/trunk@31075 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
83a229084f
commit
c777f6a29c
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.2-alpha-31093';
|
||||
$wp_version = '4.2-alpha-31094';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
@ -2513,7 +2513,7 @@ class wpdb {
|
|||
* @return string|WP_Error The converted string, or a `WP_Error` object if the conversion fails.
|
||||
*/
|
||||
public function strip_invalid_text_for_column( $table, $column, $value ) {
|
||||
if ( $this->check_ascii( $value ) || ! is_string( $value ) ) {
|
||||
if ( ! is_string( $value ) || $this->check_ascii( $value ) ) {
|
||||
return $value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue