diff --git a/packages/framework/src/Console/Commands/ServeCommand.php b/packages/framework/src/Console/Commands/ServeCommand.php index 72ea15c8de6..a178da6500f 100644 --- a/packages/framework/src/Console/Commands/ServeCommand.php +++ b/packages/framework/src/Console/Commands/ServeCommand.php @@ -111,8 +111,10 @@ protected function useBasicOutput(): bool protected function parseEnvironmentOption(string $name): ?string { - if ($this->option($name) !== null) { - return match ($this->option($name)) { + $value = $this->option($name); + + if ($value !== null) { + return match ($value) { 'true', '' => 'enabled', 'false' => 'disabled', default => throw new InvalidArgumentException(sprintf('Invalid boolean value for --%s option.', $name))