diff --git a/migrateSessions.php b/migrateSessions.php index 90c7c0e..f77d798 100644 --- a/migrateSessions.php +++ b/migrateSessions.php @@ -95,7 +95,7 @@ $reasons = ($expired || $noData ? " ($expired expired, $noData no data)" : ''); if ($test) { - printf("Can migrate %d of %d sessions%s. Compressed from %d to %d (%.5f%% savings) in %.5f seconds\n", $migrated, $i, $reasons, $beforeSize, $afterSize, (($beforeSize-$afterSize)/$beforeSize)*100, $elapsedTime); + printf("Can migrate %d of %d sessions%s. Compressed from %d to %d (%.5f%% savings) in %.5f seconds\n", $migrated, $i, $reasons, $beforeSize, $afterSize, $beforeSize == 0 ? 0 : (($beforeSize-$afterSize)/$beforeSize)*100, $elapsedTime); } else { printf("Migrated %d of %d session files in %.5f seconds%s\n", $migrated, $i, $elapsedTime, $reasons); Mage::app()->cleanCache(Mage_Core_Model_Config::CACHE_TAG);