if ($conditions) {
    $index = 0;
    foreach ($conditions as $field => $value) {
      $alias = 'nf'. $index;
      $join[] = "INNER JOIN {notifications_fields} $alias ON n.sid = $alias.sid";
      $where[] = "$alias.field = '%s'";
      $where[] = "$alias.value = '%s'";
      $args[] = $field;
      $args[] = $value;
    }
  }

The variable $index is never incremented thereby leading to duplicate aliases. Patch attached.

CommentFileSizeAuthor
notifications_unsub.patch716 bytesZen

Comments

jose reyero’s picture

Status: Needs review » Fixed

Committed (d5 and d6 branches), thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)

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