mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 00:49:02 +00:00
Fix manual QA edge case
This commit is contained in:
parent
10a7f8acfe
commit
3541fcb237
1 changed files with 8 additions and 1 deletions
|
|
@ -66,7 +66,14 @@ class DNS extends Validator
|
|||
$dns = new Client($this->dnsServer);
|
||||
|
||||
try {
|
||||
$query = $dns->query($value, $this->type);
|
||||
$rawQuery = $dns->query($value, $this->type);
|
||||
|
||||
// Some DNS servers return all records, not only type that's asked for
|
||||
// Likely occurs when no records of specific type are found
|
||||
$query = array_filter($rawQuery, function ($record) {
|
||||
return $record->getTypeName() === $this->type;
|
||||
});
|
||||
|
||||
$this->logs = $query;
|
||||
} catch (\Exception $e) {
|
||||
$this->logs = ['error' => $e->getMessage()];
|
||||
|
|
|
|||
Loading…
Reference in a new issue