From 30cfe3bdfa03082862d859dbdcb4449d72a604b0 Mon Sep 17 00:00:00 2001 From: Tracerneo <660285+Tracerneo@users.noreply.github.com> Date: Tue, 11 Jun 2019 16:39:26 +0200 Subject: [PATCH] Change minimal port number to 0 (unix socket) (#2452) --- system/src/Grav/Framework/Uri/UriPartsFilter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/src/Grav/Framework/Uri/UriPartsFilter.php b/system/src/Grav/Framework/Uri/UriPartsFilter.php index 88fe3e64ee..51a971ab4b 100644 --- a/system/src/Grav/Framework/Uri/UriPartsFilter.php +++ b/system/src/Grav/Framework/Uri/UriPartsFilter.php @@ -84,11 +84,11 @@ public static function filterHost($host) */ public static function filterPort($port = null) { - if (null === $port || (\is_int($port) && ($port >= 1 && $port <= 65535))) { + if (null === $port || (\is_int($port) && ($port >= 0 && $port <= 65535))) { return $port; } - throw new \InvalidArgumentException('Uri port must be null or an integer between 1 and 65535'); + throw new \InvalidArgumentException('Uri port must be null or an integer between 0 and 65535'); } /**