From: Kevin Israel Date: Sun, 22 Feb 2015 02:08:24 +0000 (-0500) Subject: DatabaseBase: Document behavior of nulls in array conditions X-Git-Tag: 1.31.0-rc.0~12311^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=commitdiff_plain;h=3c16633c4f60d43711b575f4a904d5b0dbf6aa67;p=lhc%2Fweb%2Fwiklou.git DatabaseBase: Document behavior of nulls in array conditions Follows-up 26235c73376b. Change-Id: Id008557e53a8c27f49e87cb2120298ce6478b6df --- diff --git a/includes/db/Database.php b/includes/db/Database.php index 8ce7f3fcad..0a2e221993 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1638,9 +1638,10 @@ abstract class DatabaseBase implements IDatabase { * - If the value of such an array element is a scalar (such as a * string), it will be treated as data and thus quoted appropriately. * If it is null, an IS NULL clause will be added. - * - If the value is an array, an IN(...) clause will be constructed, - * such that the field name may match any of the elements in the - * array. The elements of the array will be quoted. + * - If the value is an array, an IN (...) clause will be constructed + * from its non-null elements, and an IS NULL clause will be added + * if null is present, such that the field may match any of the + * elements in the array. The non-null elements will be quoted. * * Note that expressions are often DBMS-dependent in their syntax. * DBMS-independent wrappers are provided for constructing several types of