Make WordPress Core

Ticket #10861: 10861.2.patch

File 10861.2.patch, 1.1 KB (added by hakre, 16 years ago)

Improved Patch

  • wp-includes/wp-db.php

     
    337337         * @param string $dbhost MySQL database host
    338338         */
    339339        function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
    340                 return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
     340                $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
    341341        }
    342342
    343343        /**
     
    355355         * @param string $dbhost MySQL database host
    356356         */
    357357        function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
    358                 register_shutdown_function(array(&$this, "__destruct"));
    359 
    360358                if ( defined('WP_DEBUG') and WP_DEBUG == true )
    361359                        $this->show_errors();
    362360
     
    403401        }
    404402
    405403        /**
    406          * PHP5 style destructor and will run when database object is destroyed.
    407          *
    408          * @since 2.0.8
    409          *
    410          * @return bool Always true
    411          */
    412         function __destruct() {
    413                 return true;
    414         }
    415 
    416         /**
    417404         * Sets the table prefix for the WordPress tables.
    418405         *
    419406         * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to