From 2bcf4b88021c0869187b79f3d3278cf1da0ef8cc Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 18 Apr 2013 09:51:02 +0000 Subject: [PATCH] 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 --- wp-includes/wp-db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 391cfa4dc9..14e765a882 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -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();