Project

General

Profile

Actions

Bug #92698

closed

variables in ContentContentObject::render

Added by David Bruchmann over 3 years ago. Updated about 2 years ago.

Status:
Closed
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:
ContentObject rendering TypoScript
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Some variable are not checked properly before usage:

$slide = isset($conf['slide.']) ? (int)$this->cObj->stdWrap($conf['slide'], $conf['slide.']) : (int)$conf['slide'];

here even $conf['slide'] might not be set, that's producing an error then.

        $slideCollect = isset($conf['slide.']['collect.']) ? (int)$this->cObj->stdWrap($conf['slide.']['collect'], $conf['slide.']['collect.']) : (int)$conf['slide.']['collect'];

here even $conf['slide.']['collect'] might not be set, that's producing an error then.
        $slideCollectReverse = isset($conf['slide.']['collectReverse.']) ? (int)$this->cObj->stdWrap($conf['slide.']['collectReverse'], $conf['slide.']['collectReverse.']) : (int)$conf['slide.']['collectReverse'];

here even $conf['slide.']['collectReverse'] might not be set, that's producing an error then.
        $slideCollectFuzzy = isset($conf['slide.']['collectFuzzy.'])
            ? (bool)$this->cObj->stdWrap($conf['slide.']['collectFuzzy'], $conf['slide.']['collectFuzzy.'])
            : (bool)$conf['slide.']['collectFuzzy'];

here $conf['slide.']['collectFuzzy'] might not be set, that's producing an error then (line 3 above).
        $conf['select.']['pidInList'] = $this->cObj->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);

here $conf['select.']['pidInList'] might not be set, that's producing an error then.

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #91657: Use stdWrapValue consitently instead of manually checking existing config with ternary operatorClosed2020-06-16

Actions
Actions #1

Updated by David Bruchmann over 3 years ago

  • Description updated (diff)
Actions #2

Updated by David Bruchmann over 3 years 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.

Actions #3

Updated by Benni Mack over 2 years ago

  • Related to Task #91657: Use stdWrapValue consitently instead of manually checking existing config with ternary operator added
Actions #4

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback

Hey David,

thank you for your bug report.

I think this is now solved with the change from https://review.typo3.org/c/Packages/TYPO3.CMS/+/64898 right?

Actions #5

Updated by Christian Kuhn about 2 years ago

  • Status changed from Needs Feedback to Closed

Hey. I hope it's ok to close here for the time being: We've had tons and tons of fixes in the content objects especially for php 8 fixes, so it's pretty likely we fixed these cases above already.

Please create fresh issues in case we still missed something.

Actions

Also available in: Atom PDF