From cb141f847f8d566747c90b59174661cc063de3cc Mon Sep 17 00:00:00 2001 From: Mark Jaquith Date: Wed, 3 Feb 2010 21:38:09 +0000 Subject: [PATCH] Use $required_php_version. Props nacin. fixes #11637 git-svn-id: https://develop.svn.wordpress.org/trunk@12939 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 69190a57e0..bcfabd107a 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 bfd6d7dc05..4b65069876 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();