Skip to content

Commit

Permalink
Fixed implicit conversion from float to int in Mage_SalesRule_Model_V…
Browse files Browse the repository at this point in the history
…alidator (#3345)

Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
Co-authored-by: Fabrizio Balliano <fabrizio.balliano@gmail.com>
  • Loading branch information
3 people authored Jul 15, 2023
1 parent a508ae5 commit 7f73fa5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/code/core/Mage/SalesRule/Model/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -465,10 +465,10 @@ public function process(Mage_Sales_Model_Quote_Item_Abstract $item)
$discountAmount = $result->getDiscountAmount();
$baseDiscountAmount = $result->getBaseDiscountAmount();

$percentKey = $item->getDiscountPercent();
/**
* Process "delta" rounding
*/
$percentKey = (string) $item->getDiscountPercent();
if ($percentKey) {
$delta = $this->_roundingDeltas[$percentKey] ?? 0;
$baseDelta = $this->_baseRoundingDeltas[$percentKey] ?? 0;
Expand Down

0 comments on commit 7f73fa5

Please sign in to comment.