WordPress.org

Make WordPress Core

Ticket #13657: 13657.diff

File 13657.diff, 2.6 KB (added by sivel, 5 years ago)
  • wp-includes/wp-db.php

     
    521521                if ( !$this->dbh ) { 
    522522                        $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 
    523523<h1>Error establishing a database connection</h1> 
    524 <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> 
     524<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>. The specific error message was: </p> 
    525525<ul> 
    526         <li>Are you sure you have the correct username and password?</li> 
    527         <li>Are you sure that you have typed the correct hostname?</li> 
    528         <li>Are you sure that the database server is running?</li> 
     526        <li>%s</li> 
    529527</ul> 
    530528<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> 
    531 "/*/WP_I18N_DB_CONN_ERROR*/, $dbhost ), 'db_connect_fail' ); 
     529"/*/WP_I18N_DB_CONN_ERROR*/, $dbhost, mysql_error() ), 'db_connect_fail' ); 
    532530                        return; 
    533531                } 
    534532 
     
    10381036                if (!$this->$dbhname ) { 
    10391037                        $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 
    10401038<h1>Error establishing a database connection</h1> 
    1041 <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> 
     1039<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>. The specific error message was: </p> 
    10421040<ul> 
    1043         <li>Are you sure you have the correct username and password?</li> 
    1044         <li>Are you sure that you have typed the correct hostname?</li> 
    1045         <li>Are you sure that the database server is running?</li> 
     1041        <li>%s</li> 
    10461042</ul> 
    10471043<p>If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p> 
    1048 "/*/WP_I18N_DB_CONN_ERROR*/, $details['db_host'] ), 'db_connect_fail' ); 
     1044"/*/WP_I18N_DB_CONN_ERROR*/, $dbhost, mysql_error() ), 'db_connect_fail' ); 
    10491045                } 
    10501046                $this->select( $details[ 'db_name' ], $this->$dbhname ); 
    10511047        }