Skip to content

Commit c9a7897

Browse files
committed
Improve HostRecord class and usage
1 parent 99e724e commit c9a7897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Rfc3986/Uri.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ public function withHost(?string $host): self
323323
return match (true) {
324324
null !== $host && str_contains($host, "\0") => throw new ValueError('Argument #1 ($host) must not contain any null bytes'),
325325
$host === $this->getRawHost() => $this,
326-
HostRecord::validate($host) => $this->withComponent(['host' => $host]),
326+
HostRecord::isValid($host) => $this->withComponent(['host' => $host]),
327327
default => throw new InvalidUriException('The host component value `'.$host.'` is not a valid host.'),
328328
};
329329
}

0 commit comments

Comments
 (0)