r39802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39801‎ | r39802 | r39803 >
Date:23:27, 21 August 2008
Author:guyvdb
Status:old
Tags:
Comment:
Fixing bug in HTML diff when the word '0' is encountered. Thanks siebrand for reporting
Modified paths:
  • /trunk/phase3/includes/Diff.php (modified) (history)
  • /trunk/phase3/includes/HTMLDiff.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HTMLDiff.php
@@ -486,7 +486,7 @@
487487
488488 private $currentParent;
489489
490 - private $newWord = "";
 490+ private $newWord = '';
491491
492492 protected $bodyStarted = false;
493493
@@ -584,7 +584,7 @@
585585 }
586586
587587 private function endWord() {
588 - if (!empty($this->newWord)) {
 588+ if ($this->newWord !== '') {
589589 $node = new TextNode($this->currentParent, $this->newWord);
590590 $this->currentParent->children[] = $node;
591591 $node->whiteBefore = $this->whiteSpaceBeforeThis;
Index: trunk/phase3/includes/Diff.php
@@ -452,7 +452,7 @@
453453 $snake0 = $bottoml1 + $most_progress[0];
454454 $snake1 = $bottoml2 + $most_progress[1];
455455 $snake2 = 0;
456 - wfDebug('Computing the LCS is too expensive. Using a heuristic.\n');
 456+ wfDebug("Computing the LCS is too expensive. Using a heuristic.\n");
457457 $this->heuristicUsed = true;
458458 return 5; /*
459459 * HACK: since we didn't really finish the LCS computation

Status & tagging log