Issue Bug Closed

#99073PHP Warning: Uninitialized string offset 0 in /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 3691

Christian Toffolo 11/12/22, 17:22 updated 02/08/23, 16:06

Description

With PHP 8.1, the method
@\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::_parseFunc@
produce a
@PHP Warning: Uninitialized string offset 0 in /typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php line 3691@
with a $theValue like
@> > > CLICK HERE < < <@

The value arrives from the bodytext field of a tx_news_domain_model_news record.

Reviews 2

History 46

  1. Chris Müller commented and changed status New Needs Feedback 11/14/22, 11:34

    I can’t reproduce neither with bodytext from text/media element nor with a news item (news 10.0.2) on a default installation. Have you adjusted something in the parseFunc configuration?

  2. Christian Toffolo commented 11/16/22, 13:09

    Please, just temporarily set:
    @$theValue = ‘> > > CLICK HERE < < <’;@
    at the beginning of ContentObjectRenderer::_parseFunc method to reproduce the warning.

    The fact that the value comes from EXT:news is secondary.

  3. Gerrit Code Review pushed patch set 1 for main to change 77322 status Needs Feedback Under Review 01/10/23, 21:34

  4. Gerrit Code Review pushed patch set 1 for 11.5 to change 77328 01/11/23, 10:17

  5. Christian Kuhn commented and changed status Under Review Resolved done 0 % 100 % 01/11/23, 10:20

    Applied in changeset commit:e936a18c2bd3898a9cf1b392f2c578c2992defd3.

  6. Benni Mack changed status Resolved Closed 02/08/23, 16:06