From 629dde868c7bb93b674db3a823019a6c46743ef5 Mon Sep 17 00:00:00 2001 From: rob1n Date: Fri, 25 May 2007 14:51:33 +0000 Subject: [PATCH] Actually check for PHP 4.2. Props nbachiyski. fixes #4336 git-svn-id: http://svn.automattic.com/wordpress/trunk@5546 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-settings.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wp-settings.php b/wp-settings.php index 30a18ecc7f..a93a12482d 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -48,8 +48,9 @@ $PHP_SELF = $_SERVER['PHP_SELF']; if ( empty($PHP_SELF) ) $_SERVER['PHP_SELF'] = $PHP_SELF = preg_replace("/(\?.*)?$/",'',$_SERVER["REQUEST_URI"]); -if ( !(phpversion() >= '4.1') ) - die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.1' ); +if ( version_compare( '4.2', phpversion(), '>' ) ) { + die( 'Your server is running PHP version ' . phpversion() . ' but WordPress requires at least 4.2.' ); +} if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') ) die( 'Your PHP installation appears to be missing the MySQL which is required for WordPress.' ); @@ -267,4 +268,4 @@ register_shutdown_function('shutdown_action_hook'); // Everything is loaded and initialized. do_action('init'); -?> \ No newline at end of file +?>