From 4126499f162da45490f060d4c10cfd4bc66f7e2e Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 7 Aug 2015 16:28:20 +0530 Subject: [PATCH] CRM-16943: CRM_Core_Form_Search assumes a checkbox. CiviGrant dashboard has none ---------------------------------------- * CRM-16943: CRM_Core_Form_Search assumes a checkbox. CiviGrant dashboard has none https://issues.civicrm.org/jira/browse/CRM-16943 --- CRM/Core/Form/Search.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Form/Search.php b/CRM/Core/Form/Search.php index 1d5cb5798c..466844bbc7 100644 --- a/CRM/Core/Form/Search.php +++ b/CRM/Core/Form/Search.php @@ -120,8 +120,10 @@ class CRM_Core_Form_Search extends CRM_Core_Form { */ public function addRowSelectors($rows) { $this->addElement('checkbox', 'toggleSelect', NULL, NULL, array('class' => 'select-rows')); - foreach ($rows as $row) { - $this->addElement('checkbox', $row['checkbox'], NULL, NULL, array('class' => 'select-row')); + if (!empty($rows)) { + foreach ($rows as $row) { + $this->addElement('checkbox', $row['checkbox'], NULL, NULL, array('class' => 'select-row')); + } } } -- 2.25.1