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

API queries filtering on multiple contact_sub_type don't work

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.12
    • Fix Version/s: 4.7.13
    • Component/s: CiviCRM API
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code

      Description

      API queries which filter on multiple contact_sub_type's don't work when using multiple IN values.

      CRM/Contact/Bao/Query.php #2872

      foreach ($value as $k => $v) {
      if (!empty($k))

      { $clause[$k] = "($alias $op '%" . CRM_Core_DAO::VALUE_SEPARATOR . CRM_Utils_Type::escape($v, 'String') . CRM_Core_DAO::VALUE_SEPARATOR . "%')"; }

      }

      It appears the values are passed to the function, however the array key of 0 is evaluated as empty, so only 1 condition is included in the search.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              devmate Adam Kwiatkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: