Skip to content

Commit

Permalink
Add (array) cast for $types inside resolve()
Browse files Browse the repository at this point in the history
  • Loading branch information
bwoebi committed Mar 24, 2016
1 parent 4311c83 commit 78cda56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/DefaultResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct() {
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"));
Expand Down

0 comments on commit 78cda56

Please sign in to comment.