mirror of
https://github.com/danog/dns.git
synced 2024-11-26 20:14:51 +01:00
Add (array) cast for $types inside resolve()
This commit is contained in:
parent
4311c836bf
commit
78cda5692a
@ -64,7 +64,7 @@ class DefaultResolver implements Resolver {
|
||||
public function resolve($name, array $options = []) {
|
||||
if (!$inAddr = @\inet_pton($name)) {
|
||||
if ($this->isValidHostName($name)) {
|
||||
$types = empty($options["types"]) ? [Record::A, Record::AAAA] : $options["types"];
|
||||
$types = empty($options["types"]) ? [Record::A, Record::AAAA] : (array) $options["types"];
|
||||
return $this->pipeResult($this->recurseWithHosts($name, $types, $options), $types);
|
||||
} else {
|
||||
return new Failure(new ResolutionException("Cannot resolve; invalid host name"));
|
||||
|
Loading…
Reference in New Issue
Block a user