From 350cfba6c898165515d6a5df7e50dd600c9be1a4 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 9 Feb 2015 22:27:43 +0000 Subject: [PATCH] WPDB: When checking to see if we can use utf8mb4, we also need to make sure PHP's MySQL client library is capable of using utf8mb4. See #21212 git-svn-id: https://develop.svn.wordpress.org/trunk@31391 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/wp-db.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index c8f456ef63..539324091d 100644 --- a/src/wp-includes/wp-db.php +++ b/src/wp-includes/wp-db.php @@ -2801,7 +2801,14 @@ class wpdb { case 'set_charset' : return version_compare( $version, '5.0.7', '>=' ); case 'utf8mb4' : // @since 4.1.0 - return version_compare( $version, '5.5.3', '>=' ); + if ( version_compare( $version, '5.5.3', '<' ) ) { + return false; + } + if ( $this->use_mysqli ) { + return mysqli_get_client_version( $this->dbh ) >= 50503; + } else { + return mysql_get_client_version( $this->dbh ) >= 50503; + } } return false;