Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.4.13, 4.5.8
    • Fix Version/s: 4.6
    • Component/s: CiviMail
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      When a contact click on the unsubscribe link, but he is no longer part of any groups (for example removed since the mailing was sent), a DB Erorr happens.

      This is due to the query on line 231 of CRM\Mailing\Event\BAO\Unsubscribe.php containing: "WHERE civicrm_group.id IN () AND". The IN () is incorrect in SQL (yes, go figure ...).

      Quick and dirty solution is to add an impossible value to the list so it is never empty. This is implemented in the commit https://github.com/cividesk/civicrm-core/commit/092f2948fc465cd5544122c543af6c120db75e86.

      Tell me if this construct works, or if we should go the difficult route of wrapping the query in an if statement testing the array_merge for an empty result.

      I will create PRs for 4.4 & 4.5 afterwards.

        Attachments

          Activity

            People

            • Assignee:
              colemanw Coleman Watts
              Reporter:
              colemanw Coleman Watts
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: