From a0cb9e274b6a4cca5f410224babb6625546ce45b Mon Sep 17 00:00:00 2001 From: Magento EngCom Team Date: Wed, 24 Jan 2018 12:17:12 -0600 Subject: [PATCH] :arrow_double_up: Forwardport of magento/magento2#13066 to 2.3-develop branch Applied pull request patch https://github.com/magento/magento2/pull/13066.patch (created by @jagritijoshi) based on commit(s): 1. bc434c1bd3cc043f988349c55a4e68d12aa17f34 Fixed GitHub Issues in 2.3-develop branch: - magento/magento2#12877: [2.2.1] Magento Database Backup Command Fails (Fix included) (reported by @azeemism) --- app/code/Magento/Backup/Model/Db.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Backup/Model/Db.php b/app/code/Magento/Backup/Model/Db.php index 776141249f92b..a629036155ea1 100644 --- a/app/code/Magento/Backup/Model/Db.php +++ b/app/code/Magento/Backup/Model/Db.php @@ -154,7 +154,7 @@ public function createBackup(\Magento\Framework\Backup\Db\BackupInterface $backu if ($tableStatus->getDataLength() > self::BUFFER_LENGTH) { if ($tableStatus->getAvgRowLength() < self::BUFFER_LENGTH) { - $limit = floor(self::BUFFER_LENGTH / $tableStatus->getAvgRowLength()); + $limit = floor(self::BUFFER_LENGTH / max($tableStatus->getAvgRowLength(), 1)); $multiRowsLength = ceil($tableStatus->getRows() / $limit); } else { $limit = 1;