Skip to content

Commit 49ee59c

Browse files
committed
Minor fixes
Signed-off-by: Jaime Pérez <jaimepc@gmail.com>
1 parent b582541 commit 49ee59c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Utils/XML.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public static function canonicalizeData(
5252
if (
5353
is_null($xpaths)
5454
&& ($element->ownerDocument !== null)
55+
&& ($element->ownerDocument->documentElement !== null)
5556
&& $element->isSameNode($element->ownerDocument->documentElement)
5657
) {
5758
// check for any PI or comments as they would have been excluded
@@ -65,7 +66,7 @@ public static function canonicalizeData(
6566
}
6667
$current = $refNode;
6768
}
68-
if ($refNode == null) {
69+
if ($refNode === null) {
6970
$element = $element->ownerDocument;
7071
}
7172
}

0 commit comments

Comments
 (0)