Closed niclashoyer closed 6 years ago
Hi there, I can not reproduce it to be honest. I did this small PHP example:
<?php
$a = 0.0;
if ($a) echo 'true';
The check is correct? How can it affect your code?
I just had a quick look. It seems that it actually wasn't a floating point number but a string like '0.000'
which was imported via the Magento 2 CSV import. I don't know why we got a string value at that point. Maybe the import does not correctly check the value types regarding EAV.
thank you :confetti_ball:
Added check for
$productAmount > 0
. We had an issue with the$productAmount
variable being a floating point number and the check at line 151 evaluated totrue
and we got a warning for a division by zero.