mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Use wp_die() for WPDB bails. Send 500 response and no-cache headers so wp_die()s are not cached. props DD32. fixes #3471
git-svn-id: https://develop.svn.wordpress.org/trunk@6110 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1240,13 +1240,17 @@ function wp_die( $message, $title = '' ) {
|
||||
else
|
||||
$admin_dir = 'wp-admin/';
|
||||
|
||||
if ( !did_action('admin_head') ) :
|
||||
if ( !function_exists('did_action') || !did_action('admin_head') ) :
|
||||
status_header(500);
|
||||
nocache_headers();
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
|
||||
if ( empty($title) )
|
||||
$title = __('WordPress › Error');
|
||||
|
||||
|
||||
if ( empty($title) ){
|
||||
if( function_exists('__') )
|
||||
$title = __('WordPress › Error');
|
||||
else
|
||||
$title = 'WordPress › Error';
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
Reference in New Issue
Block a user