From 843fd751edefe74bc0441e67f259950f45992e9b Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Mon, 1 Sep 2014 22:58:52 +0100 Subject: [PATCH] Fix undefined index warning Conflicts: CRM/Grant/BAO/Grant.php --- CRM/Grant/BAO/Grant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Grant/BAO/Grant.php b/CRM/Grant/BAO/Grant.php index f0a91cfbb4..de5356adcb 100644 --- a/CRM/Grant/BAO/Grant.php +++ b/CRM/Grant/BAO/Grant.php @@ -269,7 +269,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant { if (!$id) { $id = CRM_Utils_Array::value('contact_id', $params); } - if (CRM_Utils_Array::value('note', $params) || CRM_Utils_Array::value('id', CRM_Utils_Array::value('note',$ids))) { + if (!empty($params['note']) || CRM_Utils_Array::value('id', CRM_Utils_Array::value('note', $ids))) { $noteParams = array( 'entity_table' => 'civicrm_grant', 'note' => $params['note'] = $params['note'] ? $params['note'] : "null", @@ -278,7 +278,7 @@ class CRM_Grant_BAO_Grant extends CRM_Grant_DAO_Grant { 'modified_date' => date('Ymd'), ); - CRM_Core_BAO_Note::add($noteParams, $ids['note']); + CRM_Core_BAO_Note::add($noteParams, (array) CRM_Utils_Array::value('note', $ids)); } // Log the information on successful add/edit of Grant $logParams = array( -- 2.25.1