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

Error when creating a "Bar or Pie Chart..." with contribution in the future.

    Details

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

      Description

      Fatal error: Cannot use string offset as an array in packages/pChart/pChart.class.php on line 428

      In CRM/Contribute/Form/ContributionCharts.php, line 133 array_combine() is called without checking that both arrays have the same number of keys (an E_WARNING is thrown but not caught).

      We had a contribution in the future, which is how we discovered this bug in the first place. Another issue might be whether or not CiviContribute should allow contributions in the future? In our case it was an accident. Setting the contribution to the correct month/year fixed the problem but the proper thing would be to do a little more validation before passing it off in barGraph(), line 182.

        Attachments

          Activity

            People

            • Assignee:
              amit Amiteshwar Prasad
              Reporter:
              dharmatech Dharmatech
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: