Skip to content

Commit a336afa

Browse files
committed
Fix error message for withPort
1 parent 8c141b1 commit a336afa

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/WhatWg/Url.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,7 @@ public function withPort(?int $port): self
258258

259259
null === $port ||
260260
(self::PORT_RANGE_MIN <= $port && self::PORT_RANGE_MAX >= $port) ||
261-
throw new InvalidUrlException(
262-
'The specified port is malformed.',
263-
[new UrlValidationError((string) $port, UrlValidationErrorType::PortOutOfRange, true)]
264-
);
261+
throw new InvalidUrlException('The specified port is malformed.');
265262

266263
$copy = $this->copy();
267264
$copy->url->port = (string) $port;

0 commit comments

Comments
 (0)