Changeset 6458

Show
Ignore:
Timestamp:
12/21/07 19:28:21 (9 months 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

Files:

Legend:

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

    r6455 r6458  
    2121    var $col_info; 
    2222    var $queries; 
     23    var $ready = false; 
    2324 
    2425    // Our tables 
     
    7576<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> 
    7677"); 
     78            return; 
    7779        } 
    7880 
     
    8183 
    8284        $this->select($dbname); 
     85        $this->ready = true; 
    8386    } 
    8487 
     
    102105</ul> 
    103106<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>"); 
     107            return; 
    104108        } 
    105109    } 
     
    196200 
    197201    function query($query) { 
     202        if ( ! $ready ) 
     203            return false; 
     204 
    198205        // filter the query, if filters are available 
    199206        // NOTE: some queries are made before the plugins have been loaded, and thus cannot be filtered with this method