From 0f3b394f11fee15778fa0197d2d413f36644bd29 Mon Sep 17 00:00:00 2001 From: catch Date: Fri, 23 Dec 2011 12:35:42 +0900 Subject: [PATCH] Issue #1371256 by ayelet_Cr: Document that QueryConditionInterface::condition() should not be used to add NULL conditions. --- core/includes/database/query.inc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/includes/database/query.inc b/core/includes/database/query.inc index 9cdd8784eb6..0effedae19c 100644 --- a/core/includes/database/query.inc +++ b/core/includes/database/query.inc @@ -22,6 +22,9 @@ interface QueryConditionInterface { * parameters, they are taken as $field and $value with $operator having a * value of IN if $value is an array and = otherwise. * + * Do not use this method to test for NULL values. Instead, use + * QueryConditionInterface::isNull() or QueryConditionInterface::isNotNull(). + * * @param $field * The name of the field to check. If you would like to add a more complex * condition involving operators or functions, use where(). @@ -36,6 +39,9 @@ interface QueryConditionInterface { * * @return QueryConditionInterface * The called object. + * + * @see QueryConditionInterface::isNull() + * @see QueryConditionInterface::isNotNull() */ public function condition($field, $value = NULL, $operator = NULL);