Skip to content

Commit 6190a21

Browse files
committed
Merge remote-tracking branch 'origin/MC-33069-CE-3' into MC-33069
2 parents 3dacef9 + f4f0545 commit 6190a21

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/Magento/Framework/DB/FieldDataConverter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ private function getBatchSize()
128128
{
129129
if (null !== $this->envBatchSize) {
130130
$batchSize = (int) $this->envBatchSize;
131-
if (bccomp($batchSize, PHP_INT_MAX, 0) >= 0 || $batchSize < 1) {
131+
$envBatchSize = preg_replace('#[^0-9]+#', '', $this->envBatchSize);
132+
if (bccomp($envBatchSize, (string)PHP_INT_MAX, 0) === 1 || $batchSize < 1) {
132133
throw new \InvalidArgumentException(
133134
'Invalid value for environment variable ' . self::BATCH_SIZE_VARIABLE_NAME . '. '
134135
. 'Should be integer, >= 1 and < value of PHP_INT_MAX'

0 commit comments

Comments
 (0)