Only show database errors if WP_DEBUG_DISPLAY is enabled. props cheeserolls, storkontheroof, crazycoders. fixes #22203.

git-svn-id: http://core.svn.wordpress.org/trunk@24027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-04-18 09:51:02 +00:00
parent 6573ffa1e1
commit 2bcf4b8802
1 changed files with 1 additions and 1 deletions

View File

@ -536,7 +536,7 @@ class wpdb {
function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
register_shutdown_function( array( $this, '__destruct' ) );
if ( WP_DEBUG )
if ( WP_DEBUG && WP_DEBUG_DISPLAY )
$this->show_errors();
$this->init_charset();