Skip to content

Commit

Permalink
RECO-1240: fixed issue with calculation of items per page in feed export
Browse files Browse the repository at this point in the history
  • Loading branch information
ma4nn committed May 27, 2020
1 parent 54f616c commit 002f6a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Model/Feed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 002f6a0

Please sign in to comment.