Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16286

Error on Search Builder using IN operator on strings

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.8, 4.6
    • Fix Version/s: 4.6.4
    • Component/s: CiviCRM Search
    • Labels:

      Description

      Trying to search in Search Builder using IN on a regular string field results in a fatal error with no explanation.

      To replicate, search for any of the following:
      Contacts / Email / IN / (test1@example.com, test2@example.com)
      Contacts / City / IN / (Washington, Baltimore)
      Individual / Last Name / IN / (Hunt, Hanley, Cook)

      Removing the spaces does nothing to help. Removing the parentheses causes the form to complain that you're not using the right format.

      The backtrace shows the error happening at Line 2195 of CRM/Contact/BAO/Query.php:
      https://github.com/civicrm/civicrm-core/blob/4.6/CRM/Contact/BAO/Query.php#L2195
      That line is preceded by the comment "we don't know when this might happen", so consider the mystery solved!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                monish.deb Monish Deb
                Reporter:
                andrewhunt Andrew Hunt
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: