Skip to content

Commit 9aaa5cd

Browse files
committed
ACP2E-2244: Asynchronous Indexing Errors
1 parent 9a58794 commit 9aaa5cd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/internal/Magento/Framework/MessageQueue/MessageValidator.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,14 @@ protected function validatePrimitiveType($message, $messageType, $topic)
119119
$realType = $this->getRealType($message);
120120
if ($realType == 'array' && count($message) == 0) {
121121
return;
122-
} elseif ($realType == 'array' && isset($message[0])) {
123-
$realType = $this->getRealType($message[0]);
122+
} elseif ($realType == 'array') {
124123
$compareType = preg_replace('/\[\]/', '', $messageType);
124+
foreach ($message as $subMessage) {
125+
$this->validatePrimitiveType($subMessage, $compareType, $topic);
126+
}
127+
return;
125128
}
129+
126130
if ($realType !== $compareType) {
127131
throw new InvalidArgumentException(
128132
new Phrase(

0 commit comments

Comments
 (0)