From 002f6a01d4f2b42f4c2dbb5d47a7997680820302 Mon Sep 17 00:00:00 2001 From: Christoph Massmann Date: Wed, 27 May 2020 10:15:05 +0200 Subject: [PATCH] RECO-1240: fixed issue with calculation of items per page in feed export --- Model/Feed.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Model/Feed.php b/Model/Feed.php index 7305aab..0cd907d 100644 --- a/Model/Feed.php +++ b/Model/Feed.php @@ -253,8 +253,9 @@ private function finishExport() private function getItemsPerPage() { if ($this->itemsPerPage === null) { - $memoryLimit = trim(ini_get('memory_limit')); - $lastMemoryLimitLetter = strtolower($memoryLimit[strlen($memoryLimit) - 1]); + $memoryLimitConfigValue = trim(ini_get('memory_limit')); + $lastMemoryLimitLetter = strtolower($memoryLimitConfigValue[strlen($memoryLimitConfigValue) - 1]); + $memoryLimit = (int) $memoryLimitConfigValue; switch ($lastMemoryLimitLetter) { case 'g': $memoryLimit *= 1024;