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.