From 55feaf2792fd69d7dafd9d694ddcca0331705f32 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 10 Mar 2016 11:29:08 +0530 Subject: [PATCH] CRM-18200 - Warning thrown on saving 'Financial Batch' --- CRM/Contribute/BAO/ContributionRecur.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/BAO/ContributionRecur.php b/CRM/Contribute/BAO/ContributionRecur.php index b139c9469b..98b1a1d9f4 100644 --- a/CRM/Contribute/BAO/ContributionRecur.php +++ b/CRM/Contribute/BAO/ContributionRecur.php @@ -760,7 +760,7 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) public static function recurringContribution(&$form) { // Recurring contribution fields foreach (self::getRecurringFields() as $key => $label) { - if ($key == 'contribution_recur_payment_made' && + if ($key == 'contribution_recur_payment_made' && !empty($form->_formValues) && !CRM_Utils_System::isNull(CRM_Utils_Array::value($key, $form->_formValues)) ) { $form->assign('contribution_recur_pane_open', TRUE); @@ -768,7 +768,7 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) } CRM_Core_Form_Date::buildDateRange($form, $key, 1, '_low', '_high'); // If data has been entered for a recurring field, tell the tpl layer to open the pane - if (!empty($form->_formValues[$key . '_relative']) || !empty($form->_formValues[$key . '_low']) || !empty($form->_formValues[$key . '_high'])) { + if (!empty($form->_formValues) && !empty($form->_formValues[$key . '_relative']) || !empty($form->_formValues[$key . '_low']) || !empty($form->_formValues[$key . '_high'])) { $form->assign('contribution_recur_pane_open', TRUE); break; } -- 2.25.1