Skip to content

Commit

Permalink
Merge pull request #9477 from eileenmcnaughton/4.7.14-rc
Browse files Browse the repository at this point in the history
Revert "CRM-19626 - Event Registration page allows registration even …
  • Loading branch information
eileenmcnaughton authored Dec 1, 2016
2 parents 805b698 + db7f102 commit 6f65f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 81 deletions.
9 changes: 2 additions & 7 deletions CRM/Event/Form/Registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@ public static function validatePriceSet(&$form, $params) {
$feeBlock = $priceSetDetails['fields'];
}

$optionMaxValues = $fieldSelected = $priceFieldCheck = array();
$optionMaxValues = $fieldSelected = array();
foreach ($params as $pNum => $values) {
if (!is_array($values) || $values == 'skip') {
continue;
Expand All @@ -1345,11 +1345,6 @@ public static function validatePriceSet(&$form, $params) {
continue;
}

// Make an array for selected price fields.
if (!empty($priceFieldId) && !empty($value)) {
$priceFieldCheck[] = $priceFieldId;
}

$fieldSelected[$pNum] = TRUE;

if (!$hasOptMaxValue || !is_array($value)) {
Expand Down Expand Up @@ -1379,7 +1374,7 @@ public static function validatePriceSet(&$form, $params) {
}

//validate for price field selection.
if (empty($fieldSelected[$pNum]) || empty($priceFieldCheck)) {
if (empty($fieldSelected[$pNum])) {
$errors[$pNum]['_qf_default'] = ts('Select at least one option from Event Fee(s).');
}
}
Expand Down
74 changes: 0 additions & 74 deletions tests/phpunit/CRM/Event/Form/RegistrationTest.php

This file was deleted.

0 comments on commit 6f65f8a

Please sign in to comment.