This commit is contained in:
Matthew Penner 2022-11-29 10:56:16 -07:00
parent 3ea6d45cda
commit ee863fa262
No known key found for this signature in database

View file

@ -64,7 +64,7 @@ class AllocationSelectionService
// Ranges are stored in the ports array as an array which can be // Ranges are stored in the ports array as an array which can be
// better processed in the repository. // better processed in the repository.
if (preg_match(AssignmentService::PORT_RANGE_REGEX, $port, $matches)) { if (preg_match(AssignmentService::PORT_RANGE_REGEX, $port, $matches)) {
if (abs($matches[2] - $matches[1]) > AssignmentService::PORT_RANGE_LIMIT) { if (abs(intval($matches[2]) - intval($matches[1])) > AssignmentService::PORT_RANGE_LIMIT) {
throw new DisplayException(trans('exceptions.allocations.too_many_ports')); throw new DisplayException(trans('exceptions.allocations.too_many_ports'));
} }