From a0ae4df4d389ed04f30e902a8c3c7765cd516e9b Mon Sep 17 00:00:00 2001 From: colemanw Date: Wed, 10 Jan 2024 13:11:48 -0500 Subject: [PATCH] CiviCase - Fix crash when fetching status_id pseudoconstant Fixes crash reported in https://civicrm.stackexchange.com/q/46209 --- CRM/Case/BAO/Case.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Case/BAO/Case.php b/CRM/Case/BAO/Case.php index c0d1a23dbe..f58198ba43 100644 --- a/CRM/Case/BAO/Case.php +++ b/CRM/Case/BAO/Case.php @@ -2990,7 +2990,7 @@ WHERE id IN (' . implode(',', $copiedActivityIds) . ')'; // Filter status id by case type id case 'status_id': - if (!empty($props['case_type_id'])) { + if (!empty($props['case_type_id']) && is_scalar($props['case_type_id'])) { $idField = is_numeric($props['case_type_id']) ? 'id' : 'name'; $caseType = civicrm_api3('CaseType', 'getsingle', [$idField => $props['case_type_id'], 'return' => 'definition']); if (!empty($caseType['definition']['statuses'])) { -- 2.25.1