diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c127f70fb..c3194ab78f 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-51395'; +$wp_version = '5.9-alpha-51396'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index c5d3b15434..f6eb404765 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -2573,11 +2573,11 @@ class wpdb { public function get_var( $query = null, $x = 0, $y = 0 ) { $this->func_call = "\$db->get_var(\"$query\", $x, $y)"; - if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { - $this->check_current_query = false; - } - if ( $query ) { + if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + $this->query( $query ); } @@ -2607,11 +2607,11 @@ class wpdb { public function get_row( $query = null, $output = OBJECT, $y = 0 ) { $this->func_call = "\$db->get_row(\"$query\",$output,$y)"; - if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { - $this->check_current_query = false; - } - if ( $query ) { + if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + $this->query( $query ); } else { return null; @@ -2649,11 +2649,11 @@ class wpdb { * @return array Database query result. Array indexed from 0 by SQL result row number. */ public function get_col( $query = null, $x = 0 ) { - if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { - $this->check_current_query = false; - } - if ( $query ) { + if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + $this->query( $query ); } @@ -2687,11 +2687,11 @@ class wpdb { public function get_results( $query = null, $output = OBJECT ) { $this->func_call = "\$db->get_results(\"$query\", $output)"; - if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { - $this->check_current_query = false; - } - if ( $query ) { + if ( $this->check_current_query && $this->check_safe_collation( $query ) ) { + $this->check_current_query = false; + } + $this->query( $query ); } else { return null;