Ran into an example where an amount had been ham-handed as
1 /12
instead of
1 1/2
This created a critical PHP error, feels like there's an opportunity to make that fail softer (either force convert to 1/12 and that's on QA to catch, or validating as malformed prior to save attempt)
`PHP Fatal error: Uncaught NXP\Exception\IncorrectExpression Exception in /plugins/cooked/vendor/nxp/math-executor/src/NXP/Classes/Operator.php:44
Stack trace:
Ran into an example where an amount had been ham-handed as 1 /12 instead of 1 1/2 This created a critical PHP error, feels like there's an opportunity to make that fail softer (either force convert to 1/12 and that's on QA to catch, or validating as malformed prior to save attempt)
`PHP Fatal error: Uncaught NXP\Exception\IncorrectExpression Exception in /plugins/cooked/vendor/nxp/math-executor/src/NXP/Classes/Operator.php:44 Stack trace:
0 /plugins/cooked/vendor/nxp/math-executor/src/NXP/Classes/Calculator.php(82): NXP\Classes\Operator->execute(Array)
1 /plugins/cooked/vendor/nxp/math-executor/src/NXP/MathExecutor.php(110): NXP\Classes\Calculator->calculate(Array, Array, NULL)
2 /plugins/cooked/includes/class.cooked-measurements.php(470): NXP\MathExecutor->execute('/12')
3 /plugins/cooked/includes/class.cooked-measurements.php(490): Cooked_Measurements->math('/12')
4 /plugins/cooked/includes/class.cooked-recipes.php(834): Cooked_Measurements->calculate('1 /12', 'decimal')
5 /plugins/cooked/includes/class.cooked-seo.php(56): Cooked_Recipes::single_ingredient(Array, false, true)
6 /plugins/cooked/templates/front/recipe.php(20): Cooked_SEO::schema_values(Array)`