Database: Remove support for the mysql extension.

The `mysql` extension is no longer used in PHP 7 or above. There's a good amount of conditional code in `wpdb` and the health checks that can be removed now that only the `mysqli` functions are used.

Fixes #59118


git-svn-id: https://develop.svn.wordpress.org/trunk@56475 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2023-08-26 13:01:05 +00:00
parent 7ed2467c3a
commit f71140438b
7 changed files with 109 additions and 292 deletions
+2 -2
View File
@@ -134,7 +134,7 @@ function wp_populate_basic_auth_from_authorization_header() {
}
/**
* Checks for the required PHP version, and the MySQL extension or
* Checks for the required PHP version, and the mysqli extension or
* a database drop-in.
*
* Dies if requirements are not met.
@@ -166,7 +166,7 @@ function wp_check_php_mysql_versions() {
// This runs before default constants are defined, so we can't assume WP_CONTENT_DIR is set yet.
$wp_content_dir = defined( 'WP_CONTENT_DIR' ) ? WP_CONTENT_DIR : ABSPATH . 'wp-content';
if ( ! function_exists( 'mysqli_connect' ) && ! function_exists( 'mysql_connect' )
if ( ! function_exists( 'mysqli_connect' )
&& ! file_exists( $wp_content_dir . '/db.php' )
) {
require_once ABSPATH . WPINC . '/functions.php';