From 32d18323deb33e76ccaabe3a5a17f601e9764edc Mon Sep 17 00:00:00 2001 From: markjaquith Date: Wed, 3 Feb 2010 21:38:09 +0000 Subject: [PATCH] Use $required_php_version. Props nacin. fixes #11637 git-svn-id: http://svn.automattic.com/wordpress/trunk@12939 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/setup-config.php | 5 +++-- wp-includes/wp-db.php | 6 +----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/wp-admin/setup-config.php b/wp-admin/setup-config.php index 69190a57e..bcfabd107 100644 --- a/wp-admin/setup-config.php +++ b/wp-admin/setup-config.php @@ -38,6 +38,7 @@ require_once(ABSPATH . WPINC . '/load.php'); require_once(ABSPATH . WPINC . '/compat.php'); require_once(ABSPATH . WPINC . '/functions.php'); require_once(ABSPATH . WPINC . '/classes.php'); +require_once(ABSPATH . WPINC . '/version.php'); 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.'); @@ -52,8 +53,8 @@ if (file_exists(ABSPATH . 'wp-config.php')) if (file_exists(ABSPATH . '../wp-config.php') && ! file_exists(ABSPATH . '../wp-settings.php')) wp_die("

The file 'wp-config.php' already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.

"); -if ( version_compare( '4.3', phpversion(), '>' ) ) - wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %s but WordPress requires at least 4.3.'/*/WP_I18N_OLD_PHP*/, phpversion() ) ); +if ( version_compare( $required_php_version, phpversion(), '>' ) ) + wp_die( sprintf( /*WP_I18N_OLD_PHP*/'Your server is running PHP version %1$s but WordPress requires at least %2$s.'/*/WP_I18N_OLD_PHP*/, phpversion(), $required_php_version ) ); if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) wp_die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ ); diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index bfd6d7dc0..4b6506987 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1218,7 +1218,7 @@ class wpdb { /** * Retrieve the name of the function that called wpdb. * - * Requires PHP 4.3 and searches up the list of functions until it reaches + * Searches up the list of functions until it reaches * the one that would most logically had called this method. * * @since 2.5.0 @@ -1226,10 +1226,6 @@ class wpdb { * @return string The name of the calling function */ function get_caller() { - // requires PHP 4.3+ - if ( !is_callable('debug_backtrace') ) - return ''; - $bt = debug_backtrace(); $caller = array();