=== modified file 'includes/database/query.inc' --- includes/database/query.inc 2010-05-15 07:04:21 +0000 +++ includes/database/query.inc 2010-05-31 00:17:22 +0000 @@ -1212,7 +1212,15 @@ class DatabaseCondition implements Query public function condition($field, $value = NULL, $operator = NULL) { if (!isset($operator)) { - $operator = is_array($value) ? 'IN' : '='; + if (is_array($value)) { + $operator = 'IN'; + } + elseif (!isset($value)) { + $operator = 'IS NULL'; + } + else { + $operator = '='; + } } $this->conditions[] = array( 'field' => $field, @@ -1237,11 +1245,11 @@ class DatabaseCondition implements Query } public function isNull($field) { - return $this->condition($field, NULL, 'IS NULL'); + return $this->condition($field); } public function isNotNull($field) { - return $this->condition($field, NULL, 'IS NOT NULL'); + return $this->condition($field, NULL, 'NOT NULL'); } public function &conditions() {