Skip to content

Commit

Permalink
MAE-955: Only get case details if array of cases are returned
Browse files Browse the repository at this point in the history
  • Loading branch information
olayiwola-compucorp committed Nov 15, 2022
1 parent 247d95b commit 9cad1ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/v3/Case/Getdetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9cad1ec

Please sign in to comment.