File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1616use Exception ;
1717use League \Uri \Encoder ;
1818use League \Uri \Exceptions \SyntaxError ;
19+ use League \Uri \HostRecord ;
1920use League \Uri \UriString ;
2021use SensitiveParameter ;
2122use Uri \InvalidUriException ;
@@ -322,7 +323,7 @@ public function withHost(?string $host): self
322323 return match (true ) {
323324 null !== $ host && str_contains ($ host , "\0" ) => throw new ValueError ('Argument #1 ($host) must not contain any null bytes ' ),
324325 $ host === $ this ->getRawHost () => $ this ,
325- UriString:: isValidHost ($ host ) => $ this ->withComponent (['host ' => $ host ]),
326+ HostRecord:: validate ($ host ) => $ this ->withComponent (['host ' => $ host ]),
326327 default => throw new InvalidUriException ('The host component value ` ' .$ host .'` is not a valid host. ' ),
327328 };
328329 }
You can’t perform that action at this time.
0 commit comments