summaryrefslogtreecommitdiffstats
path: root/wp-admin/includes/upgrade.php
diff options
context:
space:
mode:
Diffstat (limited to 'wp-admin/includes/upgrade.php')
-rw-r--r--wp-admin/includes/upgrade.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php
index b30daef..797e6e7 100644
--- a/wp-admin/includes/upgrade.php
+++ b/wp-admin/includes/upgrade.php
@@ -1253,10 +1253,12 @@ function translate_level_to_role($level) {
}
function wp_check_mysql_version() {
- global $wpdb;
- $result = $wpdb->check_database_version();
- if ( is_wp_error( $result ) )
- die( $result->get_error_message() );
+ global $wp_version;
+
+ // Make sure the server has MySQL 4.0
+ $mysql_version = preg_replace('|[^0-9\.]|', '', @mysql_get_server_info());
+ if ( version_compare($mysql_version, '4.0.0', '<') )
+ die(sprintf(__('<strong>ERROR</strong>: WordPress %s requires MySQL 4.0.0 or higher'), $wp_version));
}
function maybe_disable_automattic_widgets() {