Skip to content

Commit d7e9c2c

Browse files
committed
Merge remote-tracking branch 'origin/MC-33699' into 2.4-develop-php74-pr38
2 parents cc3eae2 + c2ab2ff commit d7e9c2c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ public function __construct(
9090
*/
9191
public function add($sku, $customerGroupId, $price, $qty)
9292
{
93-
if (!\Zend_Validate::is($price, 'Float') || $price <= 0 || !\Zend_Validate::is($qty, 'Float') || $qty <= 0) {
93+
if (!is_float($price) && !is_int($price) && !\Zend_Validate::is((string)$price, 'Float')
94+
|| !is_float($qty) && !is_int($qty) && !\Zend_Validate::is((string)$qty, 'Float')
95+
|| $price <= 0
96+
|| $qty <= 0
97+
) {
9498
throw new InputException(__('The data was invalid. Verify the data and try again.'));
9599
}
96100
$product = $this->productRepository->get($sku, ['edit_mode' => true]);

0 commit comments

Comments
 (0)