Template Helper class get_value no longer recognising a number string
-
I have been using the The Template Helper Class for a few years and have written a custom template that adds many records. I have been using the get_value, adding together and then outputting the result using echo (money_format’%i’, $AddedValues)
After the last update, the print_field is putting a comma in the values eg. 117,466.00 (which I can’t remember if it always output this format, BUT,
the added totals are only adding the numbers before the comma.
eg:get_value(117,466.00) + get_value(0.00) = $AddedValues
echo(money_format(‘%i’, $AddedValues) = 117.00I can sort out the problem by adding a str_replace(‘,’, ”, $value) to every single value that I am using in my calculations, but this is a massive undertaking.
Do you know what has caused this change in behavior of data type, so that get_value is no longer recognizing the string as a numeric and was it intentional?
Is there any easy solution, or do I need to rectify all my code for strictness.
Thank you
- The topic ‘Template Helper class get_value no longer recognising a number string’ is closed to new replies.