don't crash if no contributions
One way to reproduce this is
- Turn on "in-kind" in the settings.
- Make an in-kind contribution.
- Do find contributions with criteria financial type "In-kind".
- Select the contribution and choose Combined Receipts from the actions dropdown.
- Crash.
Background info: In the case of in-kind, you can't do aggregate receipting because each contribution will have its own appraisal info that needs to be output on the receipt separately.
So what's happening is that because it filters those out, it doesn't compute any years to populate the year radio, so there is no year field assigned to the form, so when it tries to add a formrule for it it crashes.
Instead this gives a proper error message.