Skip to content

Commit 96cb9da

Browse files
committed
Merge remote-tracking branch 'trigger/imported-karyna-tsymbal-atwix-magento2-34617' into ph-delivery
2 parents b9c474c + 4af66d3 commit 96cb9da

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/code/Magento/CatalogInventory/Model/StockStateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQ
135135
$result->addData($this->checkQtyIncrements($stockItem, $qty)->getData());
136136

137137
$result->setItemIsQtyDecimal($stockItem->getIsQtyDecimal());
138-
if (!$stockItem->getIsQtyDecimal() && (floor($qty) !== $qty)) {
138+
if (!$stockItem->getIsQtyDecimal() && (floor($qty) !== (float) $qty)) {
139139
$result->setHasError(true)
140140
->setMessage(__('You cannot use decimal quantity for this product.'))
141141
->setErrorCode('qty_decimal')

dev/tests/api-functional/testsuite/Magento/Webapi/WsdlGenerationFromDataObjectTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ public function testNoAuthorizedServices()
7171
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
7272
$responseContent = curl_exec($connection);
7373
$this->assertEquals(curl_getinfo($connection, CURLINFO_HTTP_CODE), 401);
74-
$this->assertStringContainsString("The consumer isn't authorized to access %resources.", $responseContent);
74+
$this->assertStringContainsString(
75+
"The consumer isn't authorized to access %resources.",
76+
htmlspecialchars_decode($responseContent, ENT_QUOTES)
77+
);
7578
}
7679

7780
public function testInvalidWsdlUrlNoServices()

0 commit comments

Comments
 (0)