From: jitendrapurohit Date: Thu, 10 Mar 2016 05:59:08 +0000 (+0530) Subject: CRM-18200 - Warning thrown on saving 'Financial Batch' X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=55feaf2792fd69d7dafd9d694ddcca0331705f32;p=civicrm-core.git CRM-18200 - Warning thrown on saving 'Financial Batch' --- 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; }