]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/wp-db.php
WordPress 3.8.3
[autoinstalls/wordpress.git] / wp-includes / wp-db.php
index 068351b76644d3fc311345c4e0af3a1aed2e89e8..9fcd4a7cab9653439858653a42940e01eba89221 100644 (file)
@@ -1139,7 +1139,15 @@ class wpdb {
                $client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;
 
                if ( WP_DEBUG ) {
+                       $error_reporting = false;
+                       if ( defined( 'E_DEPRECATED' ) ) {
+                               $error_reporting = error_reporting();
+                               error_reporting( $error_reporting ^ E_DEPRECATED );
+                       }
                        $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
+                       if ( false !== $error_reporting ) {
+                               error_reporting( $error_reporting );
+                       }
                } else {
                        $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
                }