Closed
Description
Preconditions (*)
- Magento 2.2.7
Steps to reproduce (*)
- Create a simple product with price = 0
- Create user account on frontend
- Add created product to wishlist
- Visit My Wishlist page
Expected result (*)
- Wishlist page visible without any issues
Actual result (*)
- Broken styling
- Error in server files:
"PHP Fatal error: Uncaught TypeError: Argument 1 passed to Magento\\Catalog\\Pricing\\Price\\ConfiguredOptions::getItemOptionsValue() must be of the type float, boolean given"
The problem is this file vendor/magento/module-catalog/Pricing/Price/RegularPrice.php
in getValue
method
It should return 0, not false, because this class vendor/magento/module-catalog/Pricing/Price/ConfiguredOptions.php
requires FLOAT
parameter, not BOOLEAN
public function getItemOptionsValue(float $basePrice, ItemInterface $item): float
Simple and easy to fix :-)