mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
Make dbh parameter to select optional for plugin back compat. Don't pass by ref to preserve PHP 4 support. fixes #13914
git-svn-id: http://svn.automattic.com/wordpress/trunk@15266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
bfd7a6b75b
commit
b0f05715e9
@ -733,9 +733,13 @@ class wpdb {
|
||||
* @since 0.71
|
||||
*
|
||||
* @param string $db MySQL database name
|
||||
* @param resource $dbh Optional link identifier.
|
||||
* @return null Always null.
|
||||
*/
|
||||
function select( $db, &$dbh ) {
|
||||
function select( $db, $dbh = null) {
|
||||
if ( is_null($dbh) )
|
||||
$dbh = $this->dbh;
|
||||
|
||||
if ( !@mysql_select_db( $db, $dbh ) ) {
|
||||
$this->ready = false;
|
||||
$this->bail( sprintf( /*WP_I18N_DB_SELECT_DB*/'
|
||||
|
Loading…
Reference in New Issue
Block a user