From b61d1bcec22e82d4826f4488b47321fa3532ee4b Mon Sep 17 00:00:00 2001 From: Edsel Date: Wed, 1 Apr 2015 18:20:56 +0530 Subject: [PATCH] CIVI-33 Removed unpermissioned price fields --- CRM/Event/Form/Registration.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Event/Form/Registration.php b/CRM/Event/Form/Registration.php index 73e0b88ba4..b94a49c857 100644 --- a/CRM/Event/Form/Registration.php +++ b/CRM/Event/Form/Registration.php @@ -681,10 +681,10 @@ class CRM_Event_Form_Registration extends CRM_Core_Form { $isPaidEvent = CRM_Utils_Array::value('is_monetary', $form->_values['event']); } if (!empty($form->_values['fee'])) { - foreach ($form->_values['fee'] as $fees) { + foreach ($form->_values['fee'] as $k => $fees) { foreach ($fees['options'] as $options) { if (!CRM_Core_Permission::check('add contributions of type ' . CRM_Contribute_PseudoConstant::financialType($options['financial_type_id']))) { - CRM_Core_Error::fatal(ts('You do not have permission to access this page.')); + unset($form->_values['fee'][$k]); } } } -- 2.25.1