Skip to content
Snippets Groups Projects
Commit a02784d7 authored by Francois Suter's avatar Francois Suter Committed by Susanne Moog
Browse files

[BUGFIX] Fix check for "ifEmpty" relevance

The ContentObjectRenderer checks whether it is relevant or not to apply
the ifEmpty property before actually applying it. However the check does
not use the same condition as ifEmpty itself (PHP empty() vs trim()).
This patch ensures consistency while respecting the idea of the original
fix (avoid a useless processing).

NOTE: I have inverted the two conditions in the "if" statement following
a recommendation by the Php Inspections plugin of PhpStorm which said
that the condition about "ifBlank" was faster and should be executed
first.

Resolves: #90318
Releases: 9.5,master
Change-Id: I654089f757d9339365e062dbd66948f71b8cdd93
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/63175


Reviewed-by: default avatarWolfgang Klinger <wolfgang@wazum.com>
Reviewed-by: default avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: default avatarSusanne Moog <look@susi.dev>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: default avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: default avatarSusanne Moog <look@susi.dev>
parent 580887c2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment