Improve compatibility with PHP 7.1 around arithmetic calculations
bsweeney opened this issue · 1 comments
Just leaving this hear since there's no general issue around improving compatibility with PHP 7.1 (closest relevant issue is #13). The issues can be addressed as they arise, of course, but if anyone has time to analyze any arithmetic calculations in the code that may help prevent multiple point releases to address a recurring issue.
This comes up because I bumped up against the following notice while looking at dompdf/dompdf#1093:
A non well formed numeric value encountered in /dompdf/lib/php-svg-lib/src/Svg/Tag/Text.php on line 27
Tested with php-svg-lib 0.3 and PHP 7.1:
This is less serious than the non-numeric value warning, but still a thorn in our side and indicative of potentially needed to address other unhandled numeric representation. This relates the the changes made in numeric calculation parsing (ref).
Haven't had time to analyze the issue so don't have any suggestions for a proper fix beyond casting the variables. Which I don't like to do without first looking at the code.