Jump to content

Archiving query build bug


Recommended Posts

Since you removed your bug tracker I'll post it here. When "Has poll" but "Does not have poll" options are ticked for the forum archive setting it builds the query component:

  array(1) {
    string(34) "poll_state=0 or poll_state IS NULL"

However when this gets compiled to SQL it becomes:

  string(216) "topic_archive_status=? AND approved=? AND poll_state=0 or poll_state IS NULL AND posts<? AND last_post<? AND pinned=? AND forum_id IN(6,21,31,36,378) AND starter_id NOT IN(1,83091,1690153,28665,209765) AND featured=?"
  array(6) {

As you can see the or condition is not gated with a parenthesis, it should be:

... (poll_state=0 or poll_state IS NULL) ...

Otherwise the SQL operator logic ignores the entire right hand side of the condition list, which breaks the entire archiving system.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...