diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 6201b00451..89998b8c29 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -44,12 +44,14 @@ define('WP_DEBUG', false); require(ABSPATH . WPINC . '/load.php'); require(ABSPATH . WPINC . '/version.php'); -// Also loads functions.php, plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) -wp_load_translations_early(); - // Check for the required PHP version and for the MySQL extension or a database drop-in. wp_check_php_mysql_versions(); +require_once(ABSPATH . WPINC . '/functions.php'); + +// Also loads plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) +wp_load_translations_early(); + // Turn register_globals off. wp_unregister_GLOBALS(); diff --git a/wp-includes/load.php b/wp-includes/load.php index 488f420dd4..7ad0341fb0 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -105,12 +105,12 @@ function wp_check_php_mysql_versions() { $php_version = phpversion(); if ( version_compare( $required_php_version, $php_version, '>' ) ) { wp_load_translations_early(); - wp_die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); + die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) ); } if ( ! extension_loaded( 'mysql' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) { wp_load_translations_early(); - wp_die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); + die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) ); } } @@ -709,7 +709,6 @@ function wp_load_translations_early() { require_once ABSPATH . WPINC . '/locale.php'; // General libraries - require_once ABSPATH . WPINC . '/functions.php'; require_once ABSPATH . WPINC . '/plugin.php'; $locales = $locations = array(); diff --git a/wp-load.php b/wp-load.php index 600805a2d1..1372688f3a 100644 --- a/wp-load.php +++ b/wp-load.php @@ -48,8 +48,10 @@ if ( file_exists( ABSPATH . 'wp-config.php') ) { require_once( ABSPATH . WPINC . '/load.php' ); require_once( ABSPATH . WPINC . '/version.php' ); - wp_load_translations_early(); wp_check_php_mysql_versions(); + wp_load_translations_early(); + + require_once( ABSPATH . WPINC . '/functions.php' ); // Die with an error message $die = __( "There doesn't seem to be a wp-config.php file. I need this before we can get started." ) . '

';