Skip to content
This repository was archived by the owner on Feb 23, 2020. It is now read-only.

Commit 2438d9f

Browse files
committed
Revert "Fixed an issue where event meta will set minimum or maximum registrants to zero if field value is empty."
This reverts commit 0fa5961. Changing unlimited_number project so zero is a valid number.
1 parent 8dc6113 commit 2438d9f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/EventMeta.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function getRegistrantsMinimum() {
224224
if (isset($this->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MINIMUM})) {
225225
$field = $this->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MINIMUM};
226226
$minimum = $field->value;
227-
if ($minimum !== '' && is_numeric($minimum) && $minimum >= 1) {
227+
if ($minimum !== '' && is_numeric($minimum) && $minimum >= 0) {
228228
return $minimum;
229229
}
230230
}
@@ -238,7 +238,7 @@ public function getRegistrantsMaximum() {
238238
if (isset($this->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MAXIMUM})) {
239239
$field = $this->getEvent()->{EventManagerInterface::FIELD_REGISTRATION_REGISTRANTS_MAXIMUM};
240240
$maximum = $field->value;
241-
if ($maximum !== '' && is_numeric($maximum) && $maximum >= 1) {
241+
if ($maximum !== '' && is_numeric($maximum) && $maximum >= 0) {
242242
return $maximum;
243243
}
244244
}

src/EventMetaInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ public function remainingCapacity();
141141
* Get minimum number of registrants allowed per registration.
142142
*
143143
* @return integer
144-
* Minimum number of registrants allowed (>= 1)
144+
* Minimum number of registrants allowed (>= 0)
145145
*/
146146
public function getRegistrantsMinimum();
147147

148148
/**
149149
* Get maximum number of registrants allowed per registration.
150150
*
151151
* @return integer|EventMetaInterface::CAPACITY_UNLIMITED
152-
* Maximum number of registrants allowed (>= 1), or unlimited.
152+
* Maximum number of registrants allowed (>= 0), or unlimited.
153153
*/
154154
public function getRegistrantsMaximum();
155155

0 commit comments

Comments
 (0)