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:
parent
931f8046d3
commit
69939e4929
|
@ -4248,28 +4248,7 @@ function dead_db() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, be terse.
|
// Otherwise, be terse.
|
||||||
status_header( 500 );
|
wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
|
||||||
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();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue