You might have encountered this error in magento 2.4.8-p3(php 8.1+) when you are having any shopping cart rule which is applied automatically without coupon. To solve either you change the function from private function getBaseRowTotalForChildrenProduct(mixed $item, mixed $attr, int $total): mixed
to
private function getBaseRowTotalForChildrenProduct(mixed $item, mixed $attr, float $total): float
Or create a module to be a preference for the class Subselect.php and update the file with the updated function.
Once you do it the error goes away

2X Certified Adobe Magento Commerce with 10+ years’ experience in Magento platform
