Make WordPress Core


Ignore:
Timestamp:
01/30/2007 06:33:48 PM (17 years ago)
Author:
markjaquith
Message:

Fiddle with object destruction and shutdown. Curses upon php 5.2. fixes #3354

File:
1 edited

Legend:

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

    r4620 r4841  
    4141
    4242    function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
     43        return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
     44    }
     45   
     46    function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
     47        register_shutdown_function(array(&$this, "__destruct"));
     48
    4349        $this->dbh = @mysql_connect($dbhost, $dbuser, $dbpassword);
    4450        if (!$this->dbh) {
     
    5662
    5763        $this->select($dbname);
     64    }
     65
     66    function __destruct() {
     67        return true;       
    5868    }
    5969
Note: See TracChangeset for help on using the changeset viewer.