From 4020bce857b24ea7fce12a69700ee185ce1ad447 Mon Sep 17 00:00:00 2001 From: Christian Wach Date: Mon, 16 Sep 2019 11:19:30 +0100 Subject: [PATCH] Use helper method for collecting Dashlet IDs --- CRM/Core/BAO/Dashboard.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CRM/Core/BAO/Dashboard.php b/CRM/Core/BAO/Dashboard.php index c03a91bf83..b4e4ea81c0 100644 --- a/CRM/Core/BAO/Dashboard.php +++ b/CRM/Core/BAO/Dashboard.php @@ -367,9 +367,7 @@ class CRM_Core_BAO_Dashboard extends CRM_Core_DAO_Dashboard { // Get the array of IDs. $domainDashletIDs = []; if ($domainDashlets['is_error'] == 0) { - foreach ($domainDashlets['values'] as $domainDashlet) { - $domainDashletIDs[] = $domainDashlet['id']; - } + $domainDashletIDs = CRM_Utils_Array::collect('id', $domainDashlets['values']); } // Restrict query to Dashlets in this domain. -- 2.25.1