Make WordPress Core

Ticket #34186: wordpress.patch

File wordpress.patch, 2.0 KB (added by bjerke-johannessen, 9 years ago)

Better error message

  • wp-includes/functions.php

    diff -ru wordpress-orig/wp-includes/functions.php wordpress/wp-includes/functions.php
    old new  
    33433343
    33443344</head>
    33453345<body>
    3346         <h1><?php _e( 'Error establishing a database connection' ); ?></h1>
     3346        <h1><?php _e( "Something, at least peripherally related to your database, isn't exactly as it should be, but we refuse to tell you what it is" ); ?></h1>
    33473347</body>
    33483348</html>
    33493349<?php
  • wp-includes/ms-load.php

    diff -ru wordpress-orig/wp-includes/ms-load.php wordpress/wp-includes/ms-load.php
    old new  
    408408
    409409        wp_load_translations_early();
    410410
    411         $title = __( 'Error establishing a database connection' );
     411        $title = __( "Something, at least peripherally related to your database, isn't exactly as it should be, but we refuse to tell you what it is" );
    412412
    413413        $msg  = '<h1>' . $title . '</h1>';
    414414        $msg .= '<p>' . __( 'If your site does not display, please contact the owner of this network.' ) . '';
  • wp-includes/wp-db.php

    diff -ru wordpress-orig/wp-includes/wp-db.php wordpress/wp-includes/wp-db.php
    old new  
    14951495                        }
    14961496
    14971497                        $this->bail( sprintf( __( "
    1498 <h1>Error establishing a database connection</h1>
     1498<h1>Something, at least peripherally related to your database, isn't exactly as it should be, but we refuse to tell you what it is</h1>
    14991499<p>This either means that the username and password information in your <code>wp-config.php</code> file is incorrect or we can't contact the database server at <code>%s</code>. This could mean your host's database server is down.</p>
    15001500<ul>
    15011501        <li>Are you sure you have the correct username and password?</li>