From: Coleman Watts Date: Mon, 1 Sep 2014 21:58:52 +0000 (+0100) Subject: Fix undefined index warning X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=843fd751edefe74bc0441e67f259950f45992e9b;p=civicrm-core.git Fix undefined index warning Conflicts: CRM/Grant/BAO/Grant.php --- 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(