From 78cda5692a80ec0a5b50ee7616d93426961836ec Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Thu, 24 Mar 2016 20:17:04 +0100 Subject: [PATCH] Add (array) cast for $types inside resolve() --- lib/DefaultResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/DefaultResolver.php b/lib/DefaultResolver.php index dc2814a..3466ba6 100644 --- a/lib/DefaultResolver.php +++ b/lib/DefaultResolver.php @@ -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"));