A non-numeric value encountered
-
A non-numeric value encountered in wp-content/plugins/cooked/includes/class.cooked-measurements.php on line 492.
This warning comes up once in a while on certain recipes, but not all. Anyway, I thought I’d let you know.
wp-content/plugins/cooked/includes/class.cooked-measurements.php
I have changed lines 490 – 493 on my server to get around this:
FROM:
$full_part = $amount_parts[0];
$fractional_part = self::math($amount_parts[1]);
$amount = $full_part + $fractional_part;TO:
$full_part = floatval($amount_parts[0]);
$fractional_part = floatval(self::math($amount_parts[1]));
$amount = $full_part + $fractional_part;If you want to make the appropriate updates on your side too, that would be great.
Thanks.
- This topic was modified 5 years, 8 months ago by .
- The topic ‘A non-numeric value encountered’ is closed to new replies.