diff --git a/src/Helpers/Build.php b/src/Helpers/Build.php index fd975122efd8c2b0334410e98a735a863d3ebf64..e873d837b7269e8effc75ac0301d80303c31ed28 100644 --- a/src/Helpers/Build.php +++ b/src/Helpers/Build.php @@ -547,13 +547,14 @@ */ public function checkRollout() { - $rolloutpercentage = isset($this->confProp['rollout']['percentage']) ? $this->confProp['rollout']['percentage'] : 100; - if ($rolloutpercentage >= 0 && $rolloutpercentage < 100) { - $rand_number = rand(0, 100); - if ($rand_number > $rolloutpercentage) { - return false; - } + $rolloutpercentage = isset($this->confProp['rollout']['percentage']) ? (int) $this->confProp['rollout']['percentage'] : 100; + if ($rolloutpercentage <= 0 || $rolloutpercentage > 100) { + return TRUE; + } + $rand_number = rand(1, 100); + if ($rand_number > $rolloutpercentage) { + return FALSE; } - return true; + return TRUE; } } \ No newline at end of file