diff --git a/src/Basis.php b/src/Basis.php index d590724..287f2f2 100644 --- a/src/Basis.php +++ b/src/Basis.php @@ -31,7 +31,6 @@ function isHost(string $host): bool { // IPv4 / IPv6 / Domain } function isPort(int $port): bool { - $port = intval($port); return ($port < 65536 and $port > 0); } diff --git a/src/Check.php b/src/Check.php index 6a81ec0..a7d46d7 100644 --- a/src/Check.php +++ b/src/Check.php @@ -67,6 +67,7 @@ function kmsCheckCli(string $host): void { exit; } } + $port = intval($port); if (!isPort($port)) { echo "Invalid port\n"; exit;