From cd3b29d4386ab236426192792601fc6c9a16ca1c Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 6 Sep 2011 18:02:44 +0000 Subject: [PATCH] Sanity check report size to avoid division by zero --- maintenance/importDump.php | 4 ++++ 1 file changed, 4 insertions(+) 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' ) ) { -- 2.20.1