CRM-16119: PHP 5.3 syntax compatibility fix.
authorMathieu Lutfy <mathieu@bidon.ca>
Wed, 18 Mar 2015 18:37:44 +0000 (14:37 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Wed, 18 Mar 2015 18:37:44 +0000 (14:37 -0400)
CRM/Event/Form/ParticipantFeeSelection.php

index a8ebbacccf528d86bbc1539dc7693c7d6de3b764..49ae0b075301ea631679a0fcdfeaa6ea7eba4dd4 100644 (file)
@@ -136,7 +136,8 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     else {
       foreach ($priceFieldId as $key => $value) {
         if (!empty($value) && ($this->_values['fee'][$value]['html_type'] == 'Radio' || $this->_values['fee'][$value]['html_type'] == 'Select') && !$this->_values['fee'][$value]['is_required']) {
-          $defaults[$this->_participantId]['price_' . array_keys($this->_values['fee'])[$key]] = 0;
+          $fee_keys = array_keys($this->_values['fee']);
+          $defaults[$this->_participantId]['price_' . $fee_keys[$key]] = 0;
         }
       }
     }