Ticket #10861: 10861.patch
File 10861.patch, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/wp-db.php
337 337 * @param string $dbhost MySQL database host 338 338 */ 339 339 function wpdb($dbuser, $dbpassword, $dbname, $dbhost) { 340 register_shutdown_function(array(&$this, "__destruct")); 341 340 342 return $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); 341 343 } 342 344 … … 355 357 * @param string $dbhost MySQL database host 356 358 */ 357 359 function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 358 register_shutdown_function(array(&$this, "__destruct"));359 360 360 if ( defined('WP_DEBUG') and WP_DEBUG == true ) 361 361 $this->show_errors(); 362 362 … … 405 405 /** 406 406 * PHP5 style destructor and will run when database object is destroyed. 407 407 * 408 * Destructor void __destruct ( void ) 409 * 410 * @see http://www.php.net/manual/en/language.oop5.decon.php 408 411 * @since 2.0.8 409 412 * 410 * @return bool Always true413 * @return void A PHP5 style descrutctor does not return a value 411 414 */ 412 415 function __destruct() { 413 return true;414 416 } 415 417 416 418 /**