r96355 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96354‎ | r96355 | r96356 >
Date:18:02, 6 September 2011
Author:aaron
Status:ok
Tags:
Comment:
Sanity check report size to avoid division by zero
Modified paths:
  • /trunk/phase3/maintenance/importDump.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/importDump.php
@@ -74,6 +74,10 @@
7575 }
7676
7777 $this->reportingInterval = intval( $this->getOption( 'report', 100 ) );
 78+ if ( !$this->reportingInterval ) {
 79+ $this->reportingInterval = 100; // avoid division by zero
 80+ }
 81+
7882 $this->dryRun = $this->hasOption( 'dry-run' );
7983 $this->uploads = $this->hasOption( 'uploads' ); // experimental!
8084 if ( $this->hasOption( 'image-base-path' ) ) {

Status & tagging log