From 247d95b74a9e116c837dff166d9ddf0a38fcdbe9 Mon Sep 17 00:00:00 2001 From: olayiwola-compucorp Date: Tue, 15 Nov 2022 09:32:49 +0100 Subject: [PATCH 1/2] MAE-955: Fix Cases export on CiviCRM versions >= 5.41.0 This was fixed by removing temporary classes added to support old CiviCRM version,these classes are removed as they're no longer needed in CiviCRM versionson >= 5.41.0 --- CRM/Case/Export/Form/Map.php | 11 ----------- CRM/Case/Export/Form/Select.php | 10 ---------- 2 files changed, 21 deletions(-) delete mode 100644 CRM/Case/Export/Form/Map.php delete mode 100644 CRM/Case/Export/Form/Select.php diff --git a/CRM/Case/Export/Form/Map.php b/CRM/Case/Export/Form/Map.php deleted file mode 100644 index 7af90c3bf..000000000 --- a/CRM/Case/Export/Form/Map.php +++ /dev/null @@ -1,11 +0,0 @@ - Date: Tue, 15 Nov 2022 09:43:05 +0100 Subject: [PATCH 2/2] MAE-955: Only get case details if array of cases are returned --- api/v3/Case/Getdetails.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/v3/Case/Getdetails.php b/api/v3/Case/Getdetails.php index 7622de2c2..6bcd2739e 100644 --- a/api/v3/Case/Getdetails.php +++ b/api/v3/Case/Getdetails.php @@ -70,16 +70,16 @@ function _civicrm_api3_case_getdetails_spec(array &$spec) { * @throws API_Exception */ function civicrm_api3_case_getdetails(array $params) { - list( + [ 'resultMetadata' => $resultMetadata, 'params' => $params, 'toReturn' => $toReturn, - 'sql' => $sql - ) = CaseDetailsQuery::get($params); + 'sql' => $sql, + ] = CaseDetailsQuery::get($params); // Call the case api. $result = civicrm_api3_case_get(['sequential' => 0] + $params, $sql); - if (!empty($result['values'])) { + if (!empty($result['values']) && is_array($result['values'])) { $ids = array_keys($result['values']); // Remove legacy cruft.