Details
- 
    Type:Bug 
- 
    Status: Done/Fixed
- 
    Priority:Minor 
- 
    Resolution: Duplicate
- 
    Affects Version/s: 4.3.4
- 
    Fix Version/s: 4.3.6
- 
    Component/s: CiviMember
- 
    Labels:None
Description
I created a Membership in the admin, indicating a pay later contribution. When updating the contribution status, there is an error in line 1073 of CRM/Contribute/Form/Contribution.php, where this line fails :
$this->_priceSetId = CRM_Core_DAO::getFieldValue('CRM_Price_DAO_Field', $lineItems[$itemId]['price_field_id'], 'price_set_id');
because the second parameter to getFieldValue is NULL. The getFieldValue code ungracefully dies on that.
I have fixed it by wrapping the code section in an if (!empty($lineItems)) block, which works, but I am unsure whether this is the correct approach.