Make WordPress Core

Ticket #10861: 10861.patch

File 10861.patch, 1.1 KB (added by hakre, 16 years ago)
  • wp-includes/wp-db.php

     
    337337         * @param string $dbhost MySQL database host
    338338         */
    339339        function wpdb($dbuser, $dbpassword, $dbname, $dbhost) {
     340                register_shutdown_function(array(&$this, "__destruct"));
     341               
    340342                return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost);
    341343        }
    342344
     
    355357         * @param string $dbhost MySQL database host
    356358         */
    357359        function __construct($dbuser, $dbpassword, $dbname, $dbhost) {
    358                 register_shutdown_function(array(&$this, "__destruct"));
    359 
    360360                if ( defined('WP_DEBUG') and WP_DEBUG == true )
    361361                        $this->show_errors();
    362362
     
    405405        /**
    406406         * PHP5 style destructor and will run when database object is destroyed.
    407407         *
     408         * Destructor void __destruct ( void )
     409         *
     410         * @see http://www.php.net/manual/en/language.oop5.decon.php
    408411         * @since 2.0.8
    409412         *
    410          * @return bool Always true
     413         * @return void A PHP5 style descrutctor does not return a value
    411414         */
    412415        function __destruct() {
    413                 return true;
    414416        }
    415417
    416418        /**