WordPress.org

Make WordPress Core

Ticket #41655: 41655.patch

File 41655.patch, 856 bytes (added by gitlost, 4 years ago)

Patch to use wp_die() instead of die() in the terse case in dead_db().

  • src/wp-includes/functions.php

     
    37633763                wp_die($wpdb->error);
    37643764
    37653765        // Otherwise, be terse.
    3766         status_header( 500 );
    3767         nocache_headers();
    3768         header( 'Content-Type: text/html; charset=utf-8' );
    3769 ?>
    3770 <!DOCTYPE html>
    3771 <html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
    3772 <head>
    3773 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    3774         <title><?php _e( 'Database Error' ); ?></title>
    3775 
    3776 </head>
    3777 <body>
    3778         <h1><?php _e( 'Error establishing a database connection' ); ?></h1>
    3779 </body>
    3780 </html>
    3781 <?php
    3782         die();
     3766        wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
    37833767}
    37843768
    37853769/**