Make WordPress Core


Ignore:
Timestamp:
12/20/2007 02:10:09 AM (19 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r6391 r6426  
    116116<ul>
    117117<li>Are you sure it exists?</li>
     118<li>Does the user <code>".DB_USER."</code> have permission to use the <code>$db</code> database?</li>
    118119<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>
    119120</ul>
     
    463464         */
    464465        function bail($message) { // Just wraps errors in a nice header and footer
    465                 if ( !$this->show_errors )
     466                if ( !$this->show_errors ) {
     467                        if ( class_exists('WP_Error') )
     468                                $this->error = new WP_Error('500', $message);
     469                        else
     470                                $this->error = $message;
    466471                        return false;
     472                }
    467473                wp_die($message);
    468474        }
     475
    469476        /**
    470477         * Checks wether of not the database version is high enough to support the features WordPress uses
Note: See TracChangeset for help on using the changeset viewer.