Issue Bug Closed

#93290"split" throws TypeError under DebugExceptionHandler

Dmitry Dulepov 01/14/21, 11:39 updated 09/07/21, 07:37

Description

Typoscript:

  1 = LOAD_REGISTER
  1 {
    backendLayout.cObject = TEXT
    backendLayout.cObject {
      data = levelfield:-1, backend_layout_next_level, slide
      override.field = backend_layout
      split {
        token = pagets__
        1.current = 1
        1.wrap = |
      }
      ifEmpty = default
    }
  }

This will throw TypeException inside ContentObjectRenderer::splitObj() (see the attachment). The problem here is that this method expects either wrap or cObjNum in the split configuration but none of these properties are mandatory according to the documentation. Then in the loop there is a null passed to $this->stdWrapValue('wrap', $splitArr[$a]); as a second argument.

Reviews 1