Skip to content

Commit 023c25d

Browse files
author
Mike Weis
committed
MAGETWO-28252: Catalog Inventory Integration API
- fix SOAP failure
1 parent 71d08fc commit 023c25d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dev/tests/api-functional/testsuite/Magento/CatalogInventory/Api/ProductRepositoryInterfaceTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,15 @@ protected function findCustomAttributeQty($customAttributes)
185185
break;
186186
}
187187
}
188-
if (!empty($qtyAndStockStatus)) {
188+
if (!empty($qtyAndStockStatus) && is_array($qtyAndStockStatus)) {
189+
190+
if (array_key_exists('any_type', $qtyAndStockStatus)) {
191+
// for SOAP, need to use the inner array
192+
$qtyAndStockStatus = $qtyAndStockStatus['any_type'];
193+
}
194+
189195
// ex: [true, 1234]
190-
if (is_bool($qtyAndStockStatus[0])) {
196+
if (is_bool($qtyAndStockStatus[0]) || is_string($qtyAndStockStatus[0])) {
191197
$qty = $qtyAndStockStatus[1];
192198
} else {
193199
$qty = $qtyAndStockStatus[0];

0 commit comments

Comments
 (0)