r50291 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50290‎ | r50291 | r50292 >
Date:23:47, 6 May 2009
Author:brion
Status:ok
Tags:
Comment:
Fix a silly bug that isn't the mystery dump bug we were looking for, but could result in infinite loop during text pass if it fails just at the right time.
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -408,7 +408,7 @@
409409 // Subprocess may not send everything at once, we have to loop.
410410 while( $nbytes > strlen( $text ) ) {
411411 $buffer = fread( $this->spawnRead, $nbytes - strlen( $text ) );
412 - if( $text === false ) break;
 412+ if( $buffer === false ) break;
413413 $text .= $buffer;
414414 }
415415

Status & tagging log