-
Notifications
You must be signed in to change notification settings - Fork 9.4k
type casted $qty to float in \Magento\Catalog\Model\Product::setQty() #18149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
type casted $qty to float in \Magento\Catalog\Model\Product::setQty() #18149
Conversation
Hi @jayankaghosh. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @jayankaghosh. Thank you for your collaboration. |
@rogyar I made changes to the code to type case in the getter, but then the problem is everytime we get the price, type casting will occur, which may affect performance |
Hi @jayankaghosh. Thank you for your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be int not float.
type casted $qty to float in \Magento\Catalog\Model\Product::setQty()
Description
\Magento\Catalog\Model\Product::getQty() should return float/double now, as mentioned in it's Doc-block
Fixed Issues (if relevant)
Manual testing scenarios
checkout_cart_product_add_after
\Magento\Catalog\Model\Product
getQty
method of the above-mentioned class would return afloat
/double
instead ofstring
, as expectedContribution checklist