Ticket #21663: 21663.17.diff
File 21663.17.diff, 1.1 KB (added by , 11 years ago) |
---|
-
src/wp-includes/wp-db.php
549 549 private $use_mysqli = false; 550 550 551 551 /** 552 * Whether we've managed to successfully connect at some point 553 * 554 * @since 3.9.0 555 * @access private 556 * @var bool 557 */ 558 private $has_connected = false; 559 560 /** 552 561 * Connects to the database server and selects a database 553 562 * 554 563 * PHP5 style constructor for compatibility with PHP5. Does … … 1336 1345 1337 1346 if ( $this->dbh->connect_errno ) { 1338 1347 $this->dbh = null; 1348 1349 // Something went wrong with the mysqli connect. 1350 // If this is the first connection attempt, we should try 1351 // to fallback to ext/mysql. 1352 if ( ! $this->has_connected ) { 1353 $this->use_mysqli = false; 1354 $this->db_connect(); 1355 } 1339 1356 } 1340 1357 } else { 1341 1358 if ( WP_DEBUG ) { … … 1367 1384 1368 1385 return false; 1369 1386 } else if ( $this->dbh ) { 1387 $this->has_connected = true; 1370 1388 $this->set_charset( $this->dbh ); 1371 1389 $this->set_sql_mode(); 1372 1390 $this->ready = true;