Use $required_php_version. Props nacin. fixes #11637

git-svn-id: http://svn.automattic.com/wordpress/trunk@12939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-02-03 21:38:09 +00:00
parent 679a7b5b88
commit 32d18323de
2 changed files with 4 additions and 7 deletions

View File

@ -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("<p>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 <a href='install.php'>installing now</a>.</p>");
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*/ );

View File

@ -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();