From 1fd8260c2592ccd738b168ea84a83013693cde1c Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 13 Dec 2004 03:54:56 +0000 Subject: [PATCH] Allow empty array in select() for the where conditions --- includes/Database.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Database.php b/includes/Database.php index 70b8d7f80e..f42a2cf6a6 100644 --- a/includes/Database.php +++ b/includes/Database.php @@ -620,7 +620,7 @@ class Database { */ function select( $table, $vars, $conds='', $fname = 'Database::select', $options = array() ) { - if ( is_array( $vars ) ) { + if( is_array( $vars ) ) { $vars = implode( ',', $vars ); } if( is_array( $table ) ) { @@ -633,7 +633,7 @@ class Database { list( $useIndex, $tailOpts ) = $this->makeSelectOptions( $options ); - if ( $conds !== false && $conds != '' ) { + if( !empty( $conds ) ) { if ( is_array( $conds ) ) { $conds = $this->makeList( $conds, LIST_AND ); } -- 2.20.1