Issue Bug Rejected

#97751ContentObjectContentObjectRenderer::cObjGetSingle always return string type although using intval config

Stefan Berger 06/09/22, 07:56 updated 03/21/25, 21:50

Description

Hi,

here an example typoscript config:

integer = TEXT
integer {
   value = 2
   intval = 1
}

This is ment to result an integer value and type using the method TYPO3\CMS\Frontend\ContentObjectContentObjectRenderer::cObjGetSingle.

But in the method cObjGetSingle and render of the class TYPO3\CMS\Frontend\ContentObjectContentObjectRenderer the $content variable will be concated with no need. There for it will be cast to an string type finally.

Removing that concatenations will fix this issue.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 1

  1. Georg Ringer commented and changed status New Rejected <span data-processor="relativetime" data-value="2025-03-21T21:50:03+00:00" > 03/21/25, 21:50 </span>

    Hey,

    thanks for creating the issue. I am rejecting this issue as intval = 1 just casts the value to an integer and does not specify the return type. additionally, you are using a cobj called TEXT ^^.

    If you still would need an integer, I suggest using a custom cObj or a USER cobj