Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit fa52936

Browse files
author
Oleksii Korshenko
authored
Issue magento/magento2#18094: Should getQty() return int/float or string
- remove typecasting from the setter
1 parent 3fc107a commit fa52936

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ public function afterSave()
972972
public function setQty($qty)
973973
{
974974
if ($this->getData('qty') != $qty) {
975-
$this->setData('qty', (float)$qty);
975+
$this->setData('qty', $qty);
976976
$this->reloadPriceInfo();
977977
}
978978
return $this;

0 commit comments

Comments
 (0)