Make WordPress Core

Changeset 15266


Ignore:
Timestamp:
06/16/2010 07:28:01 PM (14 years ago)
Author:
ryan
Message:

Make dbh parameter to select optional for plugin back compat. Don't pass by ref to preserve PHP 4 support. fixes #13914

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/wp-db.php

    r14745 r15266  
    734734     *
    735735     * @param string $db MySQL database name
     736     * @param resource $dbh Optional link identifier.
    736737     * @return null Always null.
    737738     */
    738     function select( $db, &$dbh ) {
     739    function select( $db, $dbh = null) {
     740        if ( is_null($dbh) )
     741            $dbh = $this->dbh;
     742
    739743        if ( !@mysql_select_db( $db, $dbh ) ) {
    740744            $this->ready = false;
Note: See TracChangeset for help on using the changeset viewer.