Skip to content

Commit 223f2be

Browse files
committed
Make sure DOMXPath::query did not return false
1 parent d92c68a commit 223f2be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Mf2/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ public function parseH(\DOMElement $e, $is_backcompat = false, $has_nested_mf =
11021102
);
11031103
foreach ($xpaths as $xpath) {
11041104
$url = $this->xpath->query($xpath, $e);
1105-
if ($url->length === 1) {
1105+
if ($url !== false && $url->length === 1) {
11061106
$return['url'][] = $this->resolveUrl($url->item(0)->getAttribute('href'));
11071107
break;
11081108
}

0 commit comments

Comments
 (0)