Make WordPress Core

Ticket #47738: 47738.patch

File 47738.patch, 1.6 KB (added by Clorith, 4 years ago)
  • src/wp-admin/includes/class-wp-debug-data.php

     
    705705                        $extension = null;
    706706                }
    707707
    708                 /*
    709                  * Check what database engine is used, this will throw compatibility
    710                  * warnings from PHP compatibility testers, but `mysql_*` is
    711                  * still valid in PHP 5.6, so we need to account for that.
    712                  */
    713                 if ( method_exists( $wpdb, 'db_version' ) ) {
    714                         if ( $wpdb->use_mysqli ) {
    715                                 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysqli_get_server_info
    716                                 $server = mysqli_get_server_info( $wpdb->dbh );
    717                         } else {
    718                                 // phpcs:ignore WordPress.DB.RestrictedFunctions.mysql_mysql_get_server_info
    719                                 $server = mysql_get_server_info( $wpdb->dbh );
    720                         }
    721                 } else {
    722                         $server = null;
    723                 }
     708                $server = $wpdb->db_version();
    724709
    725710                if ( isset( $wpdb->use_mysqli ) && $wpdb->use_mysqli ) {
    726711                        $client_version = $wpdb->dbh->client_info;
  • src/wp-admin/includes/class-wp-site-health.php

     
    130130                                $mysql_server_type = mysql_get_server_info( $wpdb->dbh );
    131131                        }
    132132
    133                         $this->mysql_server_version = $wpdb->get_var( 'SELECT VERSION()' );
     133                        $this->mysql_server_version = $wpdb->db_version();
    134134                }
    135135
    136136                $this->health_check_mysql_rec_version = '5.6';