From: atif-shaikh Date: Thu, 12 Feb 2015 08:00:34 +0000 (+0530) Subject: CRM-5039-Testbuild Fixes X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9d8d8fd039ba580b3949786ffe791dbb03254ae6;p=civicrm-core.git CRM-5039-Testbuild Fixes --- diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index f35474ef1b..b3712698d4 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -1242,7 +1242,8 @@ WHERE v.option_group_id = g.id break; case 'select': - if (in_array($element->getValue()[0], $optIds)) { + $value = $element->getValue(); + if (in_array($value[0], $optIds)) { foreach ($element->_options as $option) { if ($option['attr']['value'] === "crm_disabled_opt-{$element->getValue()[0]}") { $placeholder = html_entity_decode($option['text']); diff --git a/CRM/Event/Form/Registration/Register.php b/CRM/Event/Form/Registration/Register.php index da41970f23..d356cfebbb 100644 --- a/CRM/Event/Form/Registration/Register.php +++ b/CRM/Event/Form/Registration/Register.php @@ -1091,8 +1091,8 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration { if ($params['tax_amount']) { $this->set('tax_amount', $params['tax_amount']); } - if (!empty($this->get('lineItem')) && is_array($this->get('lineItem'))) { - $submittedLineItems = $this->get('lineItem'); + $submittedLineItems = $this->get('lineItem'); + if (!empty($submittedLineItems) && is_array($submittedLineItems)) { $submittedLineItems[0] = $lineItem; } else {