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

Undefined index error in CRM_Event_Form_Registration::validatePriceSet() on confirmation page

    Details

      Description

      I'm getting the following error at the top of the event registration confirmation page:

      Notice: Undefined index: 21 in CRM_Event_Form_Registration::validatePriceSet() (line 1304 of civicrm/CRM/Event/Form/Registration.php).

      My event is a workshop which is configured to use a price set. The price set just contains one required checkbox field (fid=21) which has 3 different options.

      The error only appears on the confirmation the first time the page is entered. If I reload the page, then the error doesn't appear, though if I hit the back button and then 'continue' again, it appears.

      It looks like $optionMaxValues array is empty the first time line 1304 is reached, but on subsequent iterations it's been updated which is why the error only appears once.

      I've attached a patch which fixes the error, but I've no idea if this is the correct solution or if I've broken something else by doing this.

      I'm running php 5.3.3-7 by the way.

        Attachments

          Activity

            People

            • Assignee:
              yashodha Yashodha Chaku
              Reporter:
              stella Stella Power
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: