WPDB: HHVM doesn't support passing a DB link to `mysqli_get_client_version()`. While we usually pass a DB link to every `ext/mysql` and `mysqli` function call, we don't really need to do that here, as there's no way for the client library to change mid page load.

Another fun fact is that `mysql_get_client_version()` doesn't exist, but `mysql_get_client_info()` (along with `mysqli_get_client_info()') do. So, we're switching to them, in order to add a pleasing symmetry to the client version check.

Fixes #31644



git-svn-id: https://develop.svn.wordpress.org/trunk@31783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2015-03-15 12:19:12 +00:00
parent 1c63c533b1
commit 0ac085da11
1 changed files with 4 additions and 2 deletions

View File

@ -2805,10 +2805,12 @@ class wpdb {
return false; return false;
} }
if ( $this->use_mysqli ) { if ( $this->use_mysqli ) {
return mysqli_get_client_version( $this->dbh ) >= 50503; $client_version = mysqli_get_client_info();
} else { } else {
return mysql_get_client_version( $this->dbh ) >= 50503; $client_version = mysql_get_client_info();
} }
return version_compare( $client_version, '5.5.3', '>=' );
} }
return false; return false;