dev/core#1659: Set the param type for client Id.
authorTunbola Ogunwande <tunbolawande@yahoo.com>
Wed, 18 Mar 2020 15:16:37 +0000 (16:16 +0100)
committerTunbola Ogunwande <tunbolawande@yahoo.com>
Wed, 18 Mar 2020 15:16:37 +0000 (16:16 +0100)
CRM/Case/BAO/Case.php

index 0d12748dfe33e353a73a5459f9af8901718cd329..3f0783aee480f0c478c6e47dd12d5de0ddbb21ad 100644 (file)
@@ -1176,9 +1176,11 @@ SELECT civicrm_case.id, case_status.label AS case_status, status_id, civicrm_cas
      AND cr.is_active
      AND cc.id NOT IN (%2)
 HERESQL;
+
+    $clientIdType = !empty($caseInfo['client_id']) ? 'CommaSeparatedIntegers' : 'String';
     $params = [
       1 => [$caseID, 'Integer'],
-      2 => [implode(',', $caseInfo['client_id']), 'String'],
+      2 => [implode(',', $caseInfo['client_id']), $clientIdType],
     ];
     $dao = CRM_Core_DAO::executeQuery($query, $params);