From 0a1d40df5fe967f803ad9273c34de1e2670b32e5 Mon Sep 17 00:00:00 2001 From: Guy Van den Broeck Date: Mon, 27 Oct 2008 10:15:24 +0000 Subject: [PATCH] Fixed bug in HTML differ. A bad index was used when everything is removed from a page. --- includes/diff/HTMLDiff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/diff/HTMLDiff.php b/includes/diff/HTMLDiff.php index cb169aaf9e..0698059f47 100644 --- a/includes/diff/HTMLDiff.php +++ b/includes/diff/HTMLDiff.php @@ -323,7 +323,7 @@ class TextNodeDiffer { } else { $prevResult = new LastCommonParentResult(); $prevResult->parent = $this->bodyNode; - $prevResult->indexInLastCommonParent = 0; + $prevResult->indexInLastCommonParent = -1; } if (isset($nextleaf)) { $nextResult = $nextLeaf->getLastCommonParent($deletedNodes[count($deletedNodes) - 1]); -- 2.20.1