From a97341f6f22c3318a44b155b82f5b80bc07058c9 Mon Sep 17 00:00:00 2001 From: Lance Pioch Date: Sat, 15 Jun 2024 05:40:25 -0400 Subject: [PATCH] Cast to int --- app/Models/Objects/Endpoint.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Models/Objects/Endpoint.php b/app/Models/Objects/Endpoint.php index 61224fd29..428898f74 100644 --- a/app/Models/Objects/Endpoint.php +++ b/app/Models/Objects/Endpoint.php @@ -23,7 +23,8 @@ class Endpoint $this->port = (int) $port; if (str_contains($port, ':')) { - [$this->ip, $this->port] = explode(':', $port); + [$this->ip, $port] = explode(':', $port); + $this->port = (int) $port; } throw_unless(filter_var($this->ip, FILTER_VALIDATE_IP) !== false, new InvalidArgumentException("$this->ip is an invalid IP address"));