From d017a789bcb717b4ce824b3eb891e2cc4bfd3d50 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 15 Mar 2014 06:16:10 +0000 Subject: [PATCH] Send a charset header when erroring out in wp_check_php_mysql_versions(). props rodrigosprimo. fixes #26536. git-svn-id: https://develop.svn.wordpress.org/trunk@27557 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/load.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-includes/load.php b/src/wp-includes/load.php index 6f2a9a75d5..f46572e3cc 100644 --- a/src/wp-includes/load.php +++ b/src/wp-includes/load.php @@ -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.' ) ); } }