diff options
author | Aaron Schulz <aaron@users.mediawiki.org> | 2011-09-06 18:02:44 +0000 |
---|---|---|
committer | Aaron Schulz <aaron@users.mediawiki.org> | 2011-09-06 18:02:44 +0000 |
commit | cd3b29d4386ab236426192792601fc6c9a16ca1c (patch) | |
tree | eb50ec49a3183a2709b94c20b5032cf0717aaa83 /maintenance/importDump.php | |
parent | 02b2c6c8db024ce9f757d42502720aa2077102db (diff) | |
download | mediawikicore-cd3b29d4386ab236426192792601fc6c9a16ca1c.tar.gz mediawikicore-cd3b29d4386ab236426192792601fc6c9a16ca1c.zip |
Sanity check report size to avoid division by zero
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/96355
Diffstat (limited to 'maintenance/importDump.php')
-rw-r--r-- | maintenance/importDump.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 3243b5696dd5..ed8d80e2d793 100644 --- a/maintenance/importDump.php +++ b/maintenance/importDump.php @@ -74,6 +74,10 @@ TEXT; } $this->reportingInterval = intval( $this->getOption( 'report', 100 ) ); + if ( !$this->reportingInterval ) { + $this->reportingInterval = 100; // avoid division by zero + } + $this->dryRun = $this->hasOption( 'dry-run' ); $this->uploads = $this->hasOption( 'uploads' ); // experimental! if ( $this->hasOption( 'image-base-path' ) ) { |