Project

General

Profile

Actions

Bug #85604

closed

PHP warning when doing math in Fluid

Added by Rudy Gnodde almost 6 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2018-07-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Has duplicate TYPO3 Core - Bug #85741: Bugfix for MathExpressionNode.phpClosed2018-08-03

Actions
Has duplicate TYPO3 Core - Bug #87978: Missing declarations in MathExpressionNode.phpClosed2019-03-22

Actions
Actions

Also available in: Atom PDF