Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13041

Updating contribution to Completed for manually entered Membership fails

    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.

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              pdelbar Paul Delbar
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: