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

amount_other with a value of 0 results in incorrect amount

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1.2
    • Fix Version/s: 3.1.3
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      When specifying an amount_other as 0, function computeAmount() in line 899 and following of CRM/Contribute/Form/Contribution/Main.php returns a null value instead of 0. If specifying an amount as '0.00', it works as expected. This is because while on line 899 we test with isset() on $params['amount_other'] (correctly returning true for 0), on line 903 we use "empty($params['amount_other'])" instead, which returns false for 0.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              jonas Jonas Öberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: