Ticket #11464: 11464.9.2.diff
File 11464.9.2.diff, 2.4 KB (added by , 15 years ago) |
---|
-
update-core.php
219 219 220 220 @set_time_limit( 300 ); 221 221 222 $php_version = phpversion(); 223 $php_compat = version_compare( $php_version, '4.3', '>=' ); 224 $mysql_version = $wpdb->db_version(); 225 $mysql_compat = version_compare( $mysql_version, '4.1.2', '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 222 $php_required = '4.3'; 223 $mysql_required = '4.1.2'; 224 $php_version = phpversion(); 225 $mysql_version = $wpdb->db_version(); 226 $php_compat = version_compare( $php_version, $php_required, '>=' ); 227 $mysql_compat = version_compare( $mysql_version, $mysql_required, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); 226 228 227 229 if ( !$mysql_compat && !$php_compat ) 228 return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress requires PHP version 4.3 or higher and MySQL version 4.1.2 or higher. You are running PHP version %1$s and MySQL version %2$s.'), $php_version, $mysql_version ) );230 return new WP_Error( 'php_mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress requires PHP version %1$s or higher and MySQL version %2$s or higher. You are running PHP version %3$s and MySQL version %4$s.'), $php_required, $mysql_required, $php_version, $mysql_version ) ); 229 231 elseif ( !$php_compat ) 230 return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress requires PHP version 4.3 or higher. You are running version %s.'), $php_version ) );232 return new WP_Error( 'php_not_compatible', sprintf( __('The update cannot be installed because WordPress requires PHP version %1$s or higher. You are running version %2$s.'), $php_required, $php_version ) ); 231 233 elseif ( !$mysql_compat ) 232 return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress requires MySQL version 4.1.2 or higher. You are running version %s.'), $mysql_version ) );234 return new WP_Error( 'mysql_not_compatible', sprintf( __('The update cannot be installed because WordPress requires MySQL version %1$s or higher. You are running version %2$s.'), $mysql_required, $mysql_version ) ); 233 235 234 236 // Sanity check the unzipped distribution 235 237 apply_filters('update_feedback', __('Verifying the unpacked files'));