From 9d8d8fd039ba580b3949786ffe791dbb03254ae6 Mon Sep 17 00:00:00 2001 From: atif-shaikh Date: Thu, 12 Feb 2015 13:30:34 +0530 Subject: [PATCH] CRM-5039-Testbuild Fixes --- CRM/Event/Form/Registration.php | 3 ++- CRM/Event/Form/Registration/Register.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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 { -- 2.25.1