dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02b2c6c
)
Sanity check report size to avoid division by zero
author
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 6 Sep 2011 18:02:44 +0000
(18:02 +0000)
committer
Aaron Schulz
<aaron@users.mediawiki.org>
Tue, 6 Sep 2011 18:02:44 +0000
(18:02 +0000)
maintenance/importDump.php
patch
|
blob
|
history
diff --git
a/maintenance/importDump.php
b/maintenance/importDump.php
index
3243b56
..
ed8d80e
100644
(file)
--- 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' ) ) {