From 0ac085da11cacd45dd2ae8bea181f8ffba8db9f4 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Sun, 15 Mar 2015 12:19:12 +0000 Subject: [PATCH] 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 --- src/wp-includes/wp-db.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 539324091d..ae0ec7ec94 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -2805,10 +2805,12 @@ class wpdb { return false; } if ( $this->use_mysqli ) { - return mysqli_get_client_version( $this->dbh ) >= 50503; + $client_version = mysqli_get_client_info(); } 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;