Send a charset header when erroring out in wp_check_php_mysql_versions().

props rodrigosprimo.
fixes #26536.

Built from https://develop.svn.wordpress.org/trunk@27557


git-svn-id: http://core.svn.wordpress.org/trunk@27400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2014-03-15 06:17:14 +00:00
parent 08db3b53c5
commit a37d4609be
1 changed files with 2 additions and 0 deletions

View File

@ -104,11 +104,13 @@ function wp_check_php_mysql_versions() {
$php_version = phpversion();
if ( version_compare( $required_php_version, $php_version, '>' ) ) {
wp_load_translations_early();
header( 'Content-Type: text/html; charset=utf-8' );
die( sprintf( __( 'Your server is running PHP version %1$s but WordPress %2$s requires at least %3$s.' ), $php_version, $wp_version, $required_php_version ) );
}
if ( ! extension_loaded( 'mysql' ) && ! extension_loaded( 'mysqli' ) && ! file_exists( WP_CONTENT_DIR . '/db.php' ) ) {
wp_load_translations_early();
header( 'Content-Type: text/html; charset=utf-8' );
die( __( 'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.' ) );
}
}