Issue Bug Closed

#85604PHP warning when doing math in Fluid

Rudy Gnodde 07/20/18, 15:53 updated 03/26/19, 06:58

Description

The following causes a PHP warning in fluid in TYPO3 8 and 9 with PHP 7.1.

<f:variable name="total" value="12" />
<f:variable name="done" value="3" />
{total - done}
PHP Warning: A non-numeric value encountered in ...../typo3_src-8.7.17/vendor/typo3fluid/fluid/src/Core/Parser/SyntaxTree/Expression/MathExpressionNode.php line 75

It looks like the variables are passed as string. They should be cast to int or float.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.