Issue Bug Closed

#92699variables in ContentObjectRenderer::checkIf

David Bruchmann 10/24/20, 12:14 updated 05/26/24, 08:14

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

  1. David Bruchmann commented 10/24/20, 12:32

    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.

  2. Benni Mack changed Complexity no-brainer Sprint Focus Remote Sprint 05/03/22, 14:42

  3. Susanne Moog changed Sprint Focus Remote Sprint On Location Sprint 08/05/22, 13:03

  4. Oliver Hader changed Sprint Focus On Location Sprint 11/03/22, 09:04

  5. Georg Ringer commented and changed status New Closed 05/26/24, 08:10

    code changed to $this->stdWrapValue which checks everything correctly. closing issue

  6. David Bruchmann commented 05/26/24, 08:14

    I can confirm, the issue is fixed since already long time.