diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 0757f5cf60..4b86cb7381 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1993,6 +1993,10 @@ class wpdb { * @return string|null Database query result (as string), or null on failure */ function get_var( $query = null, $x = 0, $y = 0 ) { + if ( $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + $this->func_call = "\$db->get_var(\"$query\", $x, $y)"; if ( $query ) $this->query( $query ); @@ -2021,6 +2025,11 @@ class wpdb { */ function get_row( $query = null, $output = OBJECT, $y = 0 ) { $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; + + if ( $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + if ( $query ) $this->query( $query ); else @@ -2057,6 +2066,10 @@ class wpdb { * @return array Database query result. Array indexed from 0 by SQL result row number. */ function get_col( $query = null , $x = 0 ) { + if ( $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + if ( $query ) $this->query( $query ); @@ -2084,6 +2097,10 @@ class wpdb { function get_results( $query = null, $output = OBJECT ) { $this->func_call = "\$db->get_results(\"$query\", $output)"; + if ( $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + if ( $query ) $this->query( $query ); else