Ticket #10861: 10861.2.patch
File 10861.2.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 return$this->__construct($dbuser, $dbpassword, $dbname, $dbhost);340 $this->__construct($dbuser, $dbpassword, $dbname, $dbhost); 341 341 } 342 342 343 343 /** … … 355 355 * @param string $dbhost MySQL database host 356 356 */ 357 357 function __construct($dbuser, $dbpassword, $dbname, $dbhost) { 358 register_shutdown_function(array(&$this, "__destruct"));359 360 358 if ( defined('WP_DEBUG') and WP_DEBUG == true ) 361 359 $this->show_errors(); 362 360 … … 403 401 } 404 402 405 403 /** 406 * PHP5 style destructor and will run when database object is destroyed.407 *408 * @since 2.0.8409 *410 * @return bool Always true411 */412 function __destruct() {413 return true;414 }415 416 /**417 404 * Sets the table prefix for the WordPress tables. 418 405 * 419 406 * Also allows for the CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE to