Database: Use `wp_die()` instead of `die()` in `dead_db()`, for more flexibility and consistency with other error messages in core.

Props gitlost.
Fixes #41655.
Built from https://develop.svn.wordpress.org/trunk@44827


git-svn-id: http://core.svn.wordpress.org/trunk@44659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-03-11 11:31:50 +00:00
parent 931f8046d3
commit 69939e4929
2 changed files with 2 additions and 23 deletions

View File

@ -4248,28 +4248,7 @@ function dead_db() {
}
// Otherwise, be terse.
status_header( 500 );
nocache_headers();
header( 'Content-Type: text/html; charset=utf-8' );
$dir_attr = '';
if ( is_rtl() ) {
$dir_attr = ' dir="rtl"';
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php _e( 'Database Error' ); ?></title>
</head>
<body>
<h1><?php _e( 'Error establishing a database connection' ); ?></h1>
</body>
</html>
<?php
die();
wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
}
/**

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-44826';
$wp_version = '5.2-alpha-44827';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.