Skip to content

Commit ede1676

Browse files
authored
Merge pull request #556 from edhelas/master
Fix the subdomain detection, substr was using a wrong offset length
2 parents 71bed14 + 40a5597 commit ede1676

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ExtractorFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function createExtractor(UriInterface $uri, RequestInterface $request, Re
5353
}
5454

5555
// Check if $host is a subdomain of $adapterHost.
56-
if (substr($host, -strlen($adapterHost) + 1) === ".{$adapterHost}") {
56+
if (substr($host, -strlen($adapterHost) - 1) === ".{$adapterHost}") {
5757
$class = $adapter;
5858
break;
5959
}

0 commit comments

Comments
 (0)