Bug #92699

variables in ContentObjectRenderer::checkIf

Added by David Bruchmann about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Frontend
Target version:
-
Start date:
2020-10-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
ContentObjectRenderer rendering TypoScript
Complexity:
Is Regression:
Sprint Focus:

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.

#1

Updated by David Bruchmann about 1 month ago

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.

Also available in: Atom PDF