Make WordPress Core

Ticket #27933: wp-db.php.3.patch

File wp-db.php.3.patch, 725 bytes (added by doublesharp, 12 years ago)

use prefered functions and code styling

  • wp-includes/wp-db.php

     
    13381338                                }
    13391339                        }
    13401340
     1341                        // Persistent connections with mysqli are prepended with 'p:', supported on PHP5.3+
     1342                        if ( ! $new_link ){
     1343                                if ( version_compare( phpversion(), '5.3.0', '>=' ) ){
     1344                                        $host = "p:$host";
     1345                                } else {
     1346                                        _doing_it_wrong( 'wpdb::db_connect', __( 'Disabling MYSQL_NEW_LINK with MySQLi requires PHP 5.3 or later.' ), '3.9.1' );
     1347                                }
     1348                        }
     1349
    13411350                        if ( WP_DEBUG ) {
    13421351                                mysqli_real_connect( $this->dbh, $host, $this->dbuser, $this->dbpassword, null, $port, $socket, $client_flags );
    13431352                        } else {