WordPress.org

Make WordPress Core

Ticket #16758: 16758.2.patch

File 16758.2.patch, 1.5 KB (added by hakre, 7 years ago)

with _deprecated_function() call#

  • wp-admin/includes/upgrade.php

     
    18311831 * @since 2.1.0
    18321832 */
    18331833function wp_check_mysql_version() {
    1834         global $wpdb;
    1835         $result = $wpdb->check_database_version();
    1836         if ( is_wp_error( $result ) )
     1834        global $wpdb, $wp_version, $required_mysql_version;
     1835        // Make sure the server has the required MySQL version
     1836        if ( version_compare($wpdb->db_version(), $required_mysql_version, '<') ) {
     1837                $result = new WP_Error('database_version', sprintf( __( '<strong>ERROR</strong>: WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ));
    18371838                die( $result->get_error_message() );
     1839        }
    18381840}
    18391841
    18401842/**
  • wp-includes/wp-db.php

     
    14891489         * Whether MySQL database is at least the required minimum version.
    14901490         *
    14911491         * @since 2.5.0
     1492         * @deprecated 3.2
     1493         * @see wp_check_mysql_version()
    14921494         * @uses $wp_version
    14931495         * @uses $required_mysql_version
    14941496         *
    14951497         * @return WP_Error
    14961498         */
    14971499        function check_database_version() {
     1500                _deprecated_function( __FUNCTION__, '3.2' );
    14981501                global $wp_version, $required_mysql_version;
    14991502                // Make sure the server has the required MySQL version
    15001503                if ( version_compare($this->db_version(), $required_mysql_version, '<') )