Skip to content

Commit

Permalink
Fix support for docker 26+ (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru authored Jun 2, 2024
1 parent 04c88e6 commit 089f445
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Rfc1035StubDnsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,12 @@ public function resolve(string $name, ?int $typeRestriction = null, ?Cancellatio

foreach ($searchList as $searchIndex => $search) {
for ($redirects = 0; $redirects < 5; $redirects++) {
$searchName = $name;

if ($search !== null) {
$searchName = $name . "." . $search;
}
$searchName = match ($search) {
null => $name,
"." => $name . ".",
default => $name . "." . $search,
};

try {
/** @var non-empty-list<non-empty-list<DnsRecord>> $records */
Expand Down

0 comments on commit 089f445

Please sign in to comment.