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. git-svn-id: https://develop.svn.wordpress.org/trunk@44827 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
56e7d96070
commit
cba9eda1f4
|
@ -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' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue