From ceccfa10b4b7baaa80f64add64e6032742d5c28d Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Thu, 8 Jan 2015 08:44:10 +0000 Subject: [PATCH] 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 git-svn-id: https://develop.svn.wordpress.org/trunk@31094 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/wp-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index e7b74a6d45..a40e5f2f7a 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -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; }