Ticket #27240: 27240.diff
File 27240.diff, 934 bytes (added by , 11 years ago) |
---|
-
src/wp-includes/wp-db.php
1386 1386 * 1387 1387 * @since 3.9.0 1388 1388 * 1389 * @param bool $allow_bail Optional. Allows the function to bail, default true. If this is set 1390 * to false, you will need to handle the lack of database connection 1391 * manually. 1392 * 1389 1393 * @return bool True if the connection is up. 1390 1394 */ 1391 function check_connection( ) {1395 function check_connection( $allow_bail = true ) { 1392 1396 if ( $this->use_mysqli ) { 1393 1397 if ( @mysqli_ping( $this->dbh ) ) { 1394 1398 return true; … … 1431 1435 return false; 1432 1436 } 1433 1437 1438 if ( ! $allow_bail ) { 1439 return false; 1440 } 1441 1434 1442 // We weren't able to reconnect, so we better bail. 1435 1443 $this->bail( sprintf( ( " 1436 1444 <h1>Error reconnecting to the database</h1>