#92699variables in ContentObjectRenderer::checkIf
Description
Some variable are not checked properly before usage:
For many variables is checked this:
if (isset($conf['a']) || isset($conf['a.'])) {
but used are both.
Concrete example:
if (isset($conf['isTrue']) || isset($conf['isTrue.'])) {
$isTrue = isset($conf['isTrue.']) ? trim($this->stdWrap($conf['isTrue'], $conf['isTrue.'])) : trim($conf['isTrue']);
if (!$isTrue) {
$flag = false;
}
}
This example is throwing an error if $conf[‘isTrue.’] is set but $conf[‘isTrue’] not.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 6
-
David Bruchmann commented 10/24/20, 12:32
-
Benni Mack changed Complexity no-brainer Sprint Focus Remote Sprint 05/03/22, 14:42
-
Susanne Moog changed Sprint Focus
Remote SprintOn Location Sprint 08/05/22, 13:03 -
Oliver Hader changed Sprint Focus
On Location Sprint11/03/22, 09:04 -
Georg Ringer commented and changed status
NewClosed 05/26/24, 08:10code changed to
$this->stdWrapValuewhich checks everything correctly. closing issue -
David Bruchmann commented 05/26/24, 08:14
I can confirm, the issue is fixed since already long time.
Data to test:
config.pageTitle.stdWrap.override.cObject = CONTENT config.pageTitle.stdWrap.override.cObject { table = tt_content select { where = colPos=0 # pidInList = this # uidInList = this orderBy = sorting selectFields = header max = 1 } # slide = 0 # slide { # collect = 0 # collectReverse = 0 # collectFuzzy = 0 # } renderObj = TEXT renderObj.value.field = header # if.isFalse = 0 if.isFalse = field : seo_title }Commented lines were added to make the TypoScript passing the hurdles in the code.