Skip to content

Commit 75d318c

Browse files
authored
Merge pull request #13 from Rikstone/master
Update condition for empty hostnames
2 parents 7d5ff58 + e59fd68 commit 75d318c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Nmap/XmlOutputParser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ public function parse(): array
194194

195195
$hostnameElement = $xmlHost->hostnames?->hostname ?? null;
196196

197-
if (!$hostnameElement instanceof SimpleXMLElement) {
197+
if (!$hostnameElement instanceof SimpleXMLElement && $hostnameElement !== null) {
198198
continue; // ? log ? throw?
199199
}
200200

0 commit comments

Comments
 (0)