... because of a stupid error in the condition inversion code.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

Status: Active » Needs work
Issue tags: +Needs tests, +Needs backport to D7

Gist of the fix:


diff --git a/includes/database/sqlite/query.inc b/includes/database/sqlite/query.inc
index d456afa..a176ed6 100644
--- a/includes/database/sqlite/query.inc
+++ b/includes/database/sqlite/query.inc
@@ -101,7 +101,7 @@ class UpdateQuery_sqlite extends UpdateQuery {
       }
       elseif (!isset($data)) {
         // The field will be set to NULL.
-        $condition->isNull($field);
+        $condition->isNotNull($field);
       }
       else {
         $condition->condition($field, $data, '<>');

We need to increase the test coverage of UpdateQuery.

Damien Tournoud’s picture

Priority: Normal » Major
Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
1.71 KB
1.71 KB

Patches attached.

chx’s picture

Status: Needs review » Reviewed & tested by the community

Oh my.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks.

Automatically closed -- issue fixed for 2 weeks with no activity.