Project

General

Profile

Actions

Bug #28234

closed

Chained stdWrap is broken for boolean stdWrap function types

Added by Jo Hasenau over 13 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Must have
Category:
TypoScript
Target version:
Start date:
2011-07-15
Due date:
% Done:

100%

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

Description

Since 4.5 we have stdWrap functions available to be chained with other stdWrap functions.
So we can do something like

10 = TEXT
10.value = 10*20
10.prioriCalc = 1
10.prioriCalc.if.isTrue.field = doCalculation

Unfortunately this doesn't work for boolean functions like prioriCalc, since they don't set the corresponding "isExecuted" key when their result was false in the first run.
This is why the function will be called twice, while having the value set to "Array" in the second run, which will always return something else than false.

Therefor we need an additional "else if" to check for this special case and set the key to avoid the second function call.

I can't push to GIT currently, so attached you find a patch that solves this problem.


Files

class.tslib_content.php.diff (1.33 KB) class.tslib_content.php.diff Jo Hasenau, 2011-07-15 14:32
Actions

Also available in: Atom PDF