Make WordPress Core

Changeset 44827


Ignore:
Timestamp:
03/11/2019 11:30:18 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r44814 r44827  
    42494249
    42504250    // Otherwise, be terse.
    4251     status_header( 500 );
    4252     nocache_headers();
    4253     header( 'Content-Type: text/html; charset=utf-8' );
    4254 
    4255     $dir_attr = '';
    4256     if ( is_rtl() ) {
    4257         $dir_attr = ' dir="rtl"';
    4258     }
    4259     ?>
    4260 <!DOCTYPE html>
    4261 <html xmlns="http://www.w3.org/1999/xhtml"<?php echo $dir_attr; ?>>
    4262 <head>
    4263 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    4264     <title><?php _e( 'Database Error' ); ?></title>
    4265 
    4266 </head>
    4267 <body>
    4268     <h1><?php _e( 'Error establishing a database connection' ); ?></h1>
    4269 </body>
    4270 </html>
    4271     <?php
    4272     die();
     4251    wp_die( '<h1>' . __( 'Error establishing a database connection' ) . '</h1>', __( 'Database Error' ) );
    42734252}
    42744253
Note: See TracChangeset for help on using the changeset viewer.