-- fixed for CRM-12680, line items were not created properly when trying to submit...
[civicrm-core.git] / CRM / Contribute / Form / Contribution.php
index 22391fb4f693681ef2ef0a42cdbd0c867b4056d2..0253899e4d2009c270447b2674c876d7b24caae9 100644 (file)
@@ -1374,7 +1374,12 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP
         unset($submittedValues[$key]);
       }
     }
-
+     
+    // CRM-12680 set $_lineItem if its not set
+    if (empty($this->_lineItem) && !empty($lineItem)) {
+      $this->_lineItem = $lineItem;
+    }
+    
     //Get the rquire fields value only.
     $params = $this->_params = $submittedValues;