WordPress.org

Make WordPress Core

Changeset 6459


Ignore:
Timestamp:
12/21/07 19:30:08 (8 years ago)
Author:
ryan
Message:

Return after bailing since bail doesn't always die now. Don't do queries if constructor didn't complete. see #5495

File:
1 edited

Legend:

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

    r6426 r6459  
    2222    var $queries; 
    2323    var $prefix = ''; 
     24    var $ready = false; 
    2425 
    2526    // Our tables 
     
    7374<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> 
    7475"); 
     76            return; 
    7577        } 
    7678 
     
    7981 
    8082        $this->select($dbname); 
     83        $this->ready = true; 
    8184    } 
    8285 
     
    120123</ul> 
    121124<p>If you don't know how to setup a database you should <strong>contact your host</strong>. If all else fails you may find help at the <a href='http://wordpress.org/support/'>WordPress Support Forums</a>.</p>"); 
     125            return; 
    122126        } 
    123127    } 
     
    219223 
    220224    function query($query) { 
     225        if ( ! $ready ) 
     226            return false; 
     227 
    221228        // filter the query, if filters are available 
    222229        // NOTE: some queries are made before the plugins have been loaded, and thus cannot be filtered with this method 
Note: See TracChangeset for help on using the changeset viewer.