Do sanity checks for register_globals and magic quotes in setup-config.php. see #13839.

git-svn-id: https://develop.svn.wordpress.org/trunk@20482 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-04-16 21:52:02 +00:00
parent aa450a1d3a
commit 65de4fbbb0

View File

@ -47,10 +47,18 @@ 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();
// Turn register_globals off.
wp_unregister_GLOBALS();
require_once(ABSPATH . WPINC . '/compat.php');
require_once(ABSPATH . WPINC . '/class-wp-error.php');
require_once(ABSPATH . WPINC . '/formatting.php');
// Add magic quotes and set up $_REQUEST ( $_GET + $_POST )
wp_magic_quotes();
if ( ! file_exists( ABSPATH . 'wp-config-sample.php' ) )
wp_die( __( 'Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file from your WordPress installation.' ) );