mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Bootstrap/Load: Reorganize the initialization flow so that the check for PHP and MySQL requirements could run as early as possible.
This allows us to use PHP 5.6+ syntax in more files, and display a proper error message on older PHP versions, instead of causing a parse error. Fixes #48059. git-svn-id: https://develop.svn.wordpress.org/trunk@46183 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+12
-12
@@ -15,8 +15,19 @@
|
||||
*/
|
||||
define( 'WPINC', 'wp-includes' );
|
||||
|
||||
// Include files required for initialization.
|
||||
/*
|
||||
* These can't be directly globalized in version.php. When updating,
|
||||
* we're including version.php from another installation and don't want
|
||||
* these values to be overridden if already set.
|
||||
*/
|
||||
global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
|
||||
require( ABSPATH . WPINC . '/version.php' );
|
||||
require( ABSPATH . WPINC . '/load.php' );
|
||||
|
||||
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// Include files required for initialization.
|
||||
require( ABSPATH . WPINC . '/class-wp-paused-extensions-storage.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-fatal-error-handler.php' );
|
||||
require( ABSPATH . WPINC . '/class-wp-recovery-mode-cookie-service.php' );
|
||||
@@ -28,14 +39,6 @@ require( ABSPATH . WPINC . '/error-protection.php' );
|
||||
require( ABSPATH . WPINC . '/default-constants.php' );
|
||||
require_once( ABSPATH . WPINC . '/plugin.php' );
|
||||
|
||||
/*
|
||||
* These can't be directly globalized in version.php. When updating,
|
||||
* we're including version.php from another installation and don't want
|
||||
* these values to be overridden if already set.
|
||||
*/
|
||||
global $wp_version, $wp_db_version, $tinymce_version, $required_php_version, $required_mysql_version, $wp_local_package;
|
||||
require( ABSPATH . WPINC . '/version.php' );
|
||||
|
||||
/**
|
||||
* If not already configured, `$blog_id` will default to 1 in a single site
|
||||
* configuration. In multisite, it will be overridden by default in ms-settings.php.
|
||||
@@ -51,9 +54,6 @@ wp_initial_constants();
|
||||
// Make sure we register the shutdown handler for fatal errors as soon as possible.
|
||||
wp_register_fatal_error_handler();
|
||||
|
||||
// Check for the required PHP version and for the MySQL extension or a database drop-in.
|
||||
wp_check_php_mysql_versions();
|
||||
|
||||
// WordPress calculates offsets from UTC.
|
||||
date_default_timezone_set( 'UTC' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user