From: Guy Van den Broeck Date: Mon, 27 Oct 2008 10:15:24 +0000 (+0000) Subject: Fixed bug in HTML differ. A bad index was used when everything is removed from a... X-Git-Tag: 1.31.0-rc.0~44568 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=0a1d40df5fe967f803ad9273c34de1e2670b32e5;p=lhc%2Fweb%2Fwiklou.git Fixed bug in HTML differ. A bad index was used when everything is removed from a page. --- 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]);