Issue Bug Closed

#110065DataHandler->errorLog type is not specific enough

Daniel Siepmann 06/17/26, 06:18 updated 08/11/26, 08:50

Description

Official docs explain how to use this internal property for error handling: https://docs.typo3.org/permalink/t3coreapi:tcemain-error-handling
But the property is only hinted with array and misses the more specific PHPDocBlock to specify that this is a list of strings.

That leads to PHPStan errors in consuming code like:

        self::assertCount(0, $dataHandler->errorLog, 'Failed with errors: ' . implode(PHP_EOL, $dataHandler->errorLog));
  85     Parameter #2 $array of function implode expects array<string>, array   
         given.                                                                 
         🪪  argument.type                                                      

I’d therefore recommend to add a proper more specific type hint.

Reviews 2

History 27

  1. Gerrit Code Review pushed patch set 1 for main to change 94522 status New Under Review 06/17/26, 06:20

  2. Gerrit Code Review pushed patch set 2 for main to change 94522 06/17/26, 06:22

  3. Gerrit Code Review pushed patch set 3 for main to change 94522 06/17/26, 08:07

  4. Gerrit Code Review pushed patch set 4 for main to change 94522 06/18/26, 08:46

  5. Gerrit Code Review pushed patch set 1 for 14.3 to change 94526 06/18/26, 09:41

  6. Daniel Siepmann commented and changed status Under Review Resolved done 0 % 100 % 06/18/26, 09:45

    Applied in changeset commit:05dfd359f81f166f8b3bf99aac4f217ba677b237.

  7. Benni Mack changed status Resolved Closed 08/11/26, 08:50