Make WordPress Core


Ignore:
Timestamp:
12/21/2007 01:35:26 AM (18 years ago)
Author:
ryan
Message:

Set error if there is a problem connecting to the DB. Props skeltoac and Potter_System. fixes #5495 for 2.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/wp-includes/wp-db.php

    r6443 r6444  
    9898<ul>
    9999<li>Are you sure it exists?</li>
     100<li>Does the user <code>".DB_USER."</code> have permission to use the <code>$db</code> database?</li>
    100101<li>On some systems the name of your database is prefixed with your username, so it would be like username_wordpress. Could that be the problem?</li>
    101102</ul>
     
    409410     */
    410411    function bail($message) { // Just wraps errors in a nice header and footer
    411         if ( !$this->show_errors )
     412        if ( !$this->show_errors ) {
     413            if ( class_exists('WP_Error') )
     414                $this->error = new WP_Error('500', $message);
     415            else
     416                $this->error = $message;
    412417            return false;
     418        }
    413419        wp_die($message);
    414420    }
Note: See TracChangeset for help on using the changeset viewer.