Ticket #15682: 15682.patch
File 15682.patch, 1.5 KB (added by , 14 years ago) |
---|
-
wp-includes/wp-db.php
496 496 function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) { 497 497 register_shutdown_function( array( &$this, '__destruct' ) ); 498 498 499 if ( WP_DEBUG )499 if ( (WP_DEBUG ) || defined ('WP_SETUP_CONFIG') ) 500 500 $this->show_errors(); 501 501 502 502 $this->init_charset(); … … 1033 1033 } 1034 1034 1035 1035 if ( !$this->dbh ) { 1036 $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 1036 // if we're setting up, the error message here should be a little more specific 1037 if( defined ( 'WP_SETUP_CONFIG' ) ) { 1038 1039 $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 1040 <h1> We got the following error with your database credentials </h1> 1041 <code> %s </code> 1042 <p> 1043 You may want to check your credentials once again? 1044 </p> 1045 "/*/WP_I18N_DB_CONN_ERROR*/, mysql_error()), 'db_connect_fail'); 1046 die(); 1047 } else { 1048 $this->bail( sprintf( /*WP_I18N_DB_CONN_ERROR*/" 1037 1049 <h1>Error establishing a database connection</h1> 1038 1050 <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 1051 <ul> … … 1046 1058 1047 1059 //If show errors is disabled then we need to die anyway as we don't have a working DB connection 1048 1060 die(); 1061 } 1049 1062 } 1050 1063 1051 1064 $this->set_charset( $this->dbh );