From 9f1cb02d6a87eba09afd71ab961b789f78cfba4c Mon Sep 17 00:00:00 2001 From: Timon de Groot Date: Tue, 29 Nov 2016 17:41:18 +0100 Subject: [PATCH] Fix division by zero error when import happens too fast --- app/code/community/Ho/Import/Model/Import.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/code/community/Ho/Import/Model/Import.php b/app/code/community/Ho/Import/Model/Import.php index bbd9139..951743d 100644 --- a/app/code/community/Ho/Import/Model/Import.php +++ b/app/code/community/Ho/Import/Model/Import.php @@ -737,12 +737,12 @@ protected function _importData($fileName = null, $profile = null) throw $e; } - $seconds = round(microtime(true) - $timer, 2); + $seconds = microtime(true) - $timer; $rowsPerSecond = round($this->getRowCount() / $seconds, 2); $entitiesPerSecond = round($this->getEntityCount() / $seconds, 2); $this->_getLog()->log($this->_getLog()->__( 'Profile %s done in %s seconds, %s entities/s, %s rows/s.', - $profile, $seconds, $entitiesPerSecond, $rowsPerSecond + $profile, round($seconds, 4), $entitiesPerSecond, $rowsPerSecond )); return $this->_fastSimpleImport->getErrors();