Make WordPress Core

Changeset 31783


Ignore:
Timestamp:
03/15/2015 12:19:12 PM (10 years ago)
Author:
pento
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r31391 r31783  
    28062806                }
    28072807                if ( $this->use_mysqli ) {
    2808                     return mysqli_get_client_version( $this->dbh ) >= 50503;
     2808                    $client_version = mysqli_get_client_info();
    28092809                } else {
    2810                     return mysql_get_client_version( $this->dbh ) >= 50503;
     2810                    $client_version = mysql_get_client_info();
    28112811                }
     2812
     2813                return version_compare( $client_version, '5.5.3', '>=' );
    28122814        }
    28132815
Note: See TracChangeset for help on using the changeset viewer.