From: Aaron Schulz Date: Tue, 6 Sep 2011 18:02:44 +0000 (+0000) Subject: Sanity check report size to avoid division by zero X-Git-Tag: 1.31.0-rc.0~27870 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=cd3b29d4386ab236426192792601fc6c9a16ca1c;p=lhc%2Fweb%2Fwiklou.git Sanity check report size to avoid division by zero --- diff --git a/maintenance/importDump.php b/maintenance/importDump.php index 3243b5696d..ed8d80e2d7 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' ) ) {