From da4a0d988e6b507b1617bd09b71389ff481bdcad Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 10 Aug 2004 22:02:26 +0000 Subject: [PATCH] Fix for empty plugin strings, class include moved for timing. git-svn-id: http://svn.automattic.com/wordpress/trunk@1530 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index b16d66933d..c89c2b277f 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -6,6 +6,10 @@ $HTTP_USER_AGENT = getenv('HTTP_USER_AGENT'); /* visitor's browser */ // Fix for IIS, which doesn't set REQUEST_URI $_SERVER['REQUEST_URI'] = ( isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['SCRIPT_NAME'] . (( isset($_SERVER['QUERY_STRING']) ? '?' . $_SERVER['QUERY_STRING'] : ''))); +if ( !(phpversion() >= '4.1') ) + die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' ); + + // Change to E_ALL for development/debugging error_reporting(E_ALL ^ E_NOTICE); @@ -43,17 +47,15 @@ $tableoptiongroups = $wpdb->optiongroups; $tableoptiongroup_options = $wpdb->optiongroup_options; $tablepostmeta = $wpdb->postmeta; -if ( !(phpversion() >= '4.1') ) - die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' ); - - -require (ABSPATH . WPINC . '/classes.php'); require (ABSPATH . WPINC . '/functions.php'); timer_start(); require (ABSPATH . WPINC . '/functions-formatting.php'); +require (ABSPATH . WPINC . '/functions-user.php'); +require (ABSPATH . WPINC . '/classes.php'); require (ABSPATH . WPINC . '/template-functions.php'); require (ABSPATH . WPINC . '/links.php'); require (ABSPATH . WPINC . '/kses.php'); + require_once (ABSPATH . WPINC . '/wp-l10n.php'); $wpdb->hide_errors(); @@ -83,7 +85,7 @@ if (get_settings('hack_file')) { if ( get_settings('active_plugins') ) { $current_plugins = get_settings('active_plugins'); foreach ($current_plugins as $plugin) { - if (file_exists(ABSPATH . 'wp-content/plugins/' . $plugin)) + if ('' != $plugin && file_exists(ABSPATH . 'wp-content/plugins/' . $plugin)) include(ABSPATH . 'wp-content/plugins/' . $plugin); } }