]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/wp-db.php
WordPress 4.5.1
[autoinstalls/wordpress.git] / wp-includes / wp-db.php
index 22cd9430185f0fbe6e2bf9fcc4c1fdaad5c8fa20..066e851fa3e45270fe0a46908be12246a882fc49 100644 (file)
@@ -1486,7 +1486,11 @@ class wpdb {
                                }
                        }
 
-                       mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
+                       if ( WP_DEBUG ) {
+                               mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
+                       } else {
+                               @mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
+                       }
 
                        if ( $this->dbh->connect_errno ) {
                                $this->dbh = null;
@@ -1512,7 +1516,11 @@ class wpdb {
                                }
                        }
                } else {
-                       $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
+                       if ( WP_DEBUG ) {
+                               $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
+                       } else {
+                               $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
+                       }
                }
 
                if ( ! $this->dbh && $allow_bail ) {