From 596a8bdf885d7d9457039b51e81d6118c7d20651 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Tue, 7 Apr 2020 15:16:34 -0400 Subject: [PATCH] standard is bool instead of boolean --- CRM/Core/Permission.php | 2 +- CRM/Event/Page/List.php | 2 +- CRM/Report/Form/Grant/Statistics.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Permission.php b/CRM/Core/Permission.php index 3cce2d04c4..08c978af38 100644 --- a/CRM/Core/Permission.php +++ b/CRM/Core/Permission.php @@ -531,7 +531,7 @@ class CRM_Core_Permission { if (empty($item['access_callback']) || is_numeric($item['access_callback']) ) { - return (boolean ) $item['access_callback']; + return (bool) $item['access_callback']; } // check whether the following Ajax requests submitted the right key diff --git a/CRM/Event/Page/List.php b/CRM/Event/Page/List.php index 9a5cb1c513..e3f4a08618 100644 --- a/CRM/Event/Page/List.php +++ b/CRM/Event/Page/List.php @@ -24,7 +24,7 @@ class CRM_Event_Page_List extends CRM_Core_Page { $this->assign('events', $info); // check if we're in shopping cart mode for events - $enable_cart = (boolean) Civi::settings()->get('enable_cart'); + $enable_cart = (bool) Civi::settings()->get('enable_cart'); $this->assign('eventCartEnabled', $enable_cart); if ($enable_cart) { diff --git a/CRM/Report/Form/Grant/Statistics.php b/CRM/Report/Form/Grant/Statistics.php index b25f40ca88..6e8f893710 100644 --- a/CRM/Report/Form/Grant/Statistics.php +++ b/CRM/Report/Form/Grant/Statistics.php @@ -487,7 +487,7 @@ SELECT COUNT({$this->_aliases['civicrm_grant']}.id) as count , "({$values['percentage']}%)"; } $totalAmt = implode(', ', $totalAmount); - $count = (boolean) CRM_Utils_Array::value('count', $values, 0) ? $values['count'] . " ({$values['percentage']}%)" : ''; + $count = empty($values['count']) ? '' : "{$values['count']} ({$values['percentage']}%)"; $row[] = [ 'civicrm_grant_total_grants' => $field, 'civicrm_grant_count' => $count, -- 2.25.1