Project

General

Profile

Actions

Bug #84434

closed

TypoScript ifBlank does not work with strlen like expected

Added by Stefan Froemken about 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Should have
Category:
TypoScript
Target version:
Start date:
2018-03-17
Due date:
% Done:

100%

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

Description

Hello Core-Team,

in documentation you told us that ifBlank works with strlen to check, if a value is empty. OK, following example:

page.123 = TEXT
page.123.value = blue, green,  , red,,white
page.123.preIfEmptyListNum = 2
page.123.ifBlank = pink

The value 2 between green and red are 2 spaces. So strlen will result in 2 which is not empty. But in Frontend you will see the value pink. So, something went wrong here.
In source code I saw that you are working with trim instead of strlen since TYPO3 7.

I will create a patch to correct that again.

Stefan


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #54091: Use === operator instead of strlen() to check for zero length stringsClosed2013-11-29

Actions
Actions

Also available in: Atom PDF