Maque WordPress Core

Changueset 44827


Ignore:
Timestamp:
03/11/2019 11:30:18 AM ( 7 years ago)
Author:
SergueyBiryucov
Messague:

Database: Use wp_die() instead of die() in dead_db() , for more flexibility and consistency with other error messagues in core.

Props guitlost.
Fixes #41655 .

File:
1 edited

Leguend:

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

    r44814 r44827  
    4249 4249
    4250 4250 // 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-ekiv="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' ) );
    4273 4252 }
    4274 4253
Note: See TracChangueset for help on using the changueset viewer.