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

CiviPledge crashes on first pledge.

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.6
    • Fix Version/s: 3.2.2
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      The addition of the first pledge for a new donor causes the program to crash, with an error in line 411 of CRM/pledge/BAO/payment.php.

      The parameter {$paymentStatusId} is null and should have a value of 2.

      The problem was traced to line 178 of the same file where the function self::updatePledgePaymentStatus( $params['pledge_id'] ); is called.

      It is obvious from the implementation of the function that it should also receive at least the $paymentStatusID parameter, because it is needed for the function

      updatePledgePayments( $pledgeID, $paymentStatusID, $paymentIDs ) on line 324, which will not accept a null value for the second parameter.

      I was able to solve the problem by changing line 178 to:

      self::updatePledgePaymentStatus( $params['pledge_id'],$paymentIDs,$paymentStatusID,$params['status_id']);

      This may not be the best solution, as I'm not quite sure about the other cases involved, but at least it works!

        Attachments

          Activity

            People

            • Assignee:
              rahulbile Rahul Bile
              Reporter:
              leonardwestermeyer Leonard Westermeyer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: