Skip to content

Commit 80de6b9

Browse files
committed
Merge remote-tracking branch 'origin/MC-33069' into 2.4-develop-php74-pr41
2 parents f0e9d74 + 6190a21 commit 80de6b9

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)