* See ApiQuery::getNamedDB() for more information
* @param string $name Name to assign to the database connection
* @param int $db One of the DB_* constants
- * @param array $groups Query groups
+ * @param string|string[] $groups Query groups
* @return IDatabase
*/
public function selectNamedDB( $name, $db, $groups ) {
* @param string|string[] $value Value; ignored if null or empty array;
*/
protected function addWhereFld( $field, $value ) {
- // Use count() to its full documented capabilities to simultaneously
- // test for null, empty array or empty countable object
- if ( count( $value ) ) {
+ if ( $value !== null && !( is_array( $value ) && !$value ) ) {
$this->where[$field] = $value;
}
}