Review main Merged

71946[BUGFIX] Avoid passing null parameter in SchemaColumnDefinitionListener

Stefan Bürk CR +2 V +2 Easy +1 −1 updated 10/23/21, 20:17

Commit message

SchemaColumnDefinitionListener instantiates a new Column class and
passes the column name retrieved from an array. If the array key
'field' does not exist in the tableColumn definition, the null
coalescing operator with the fallback of 'null' is used, which is not
ideal because the fieldname parameter has a docblock type hint of
string.

DBAL internally there is a check of the column name using the
php-internal function strpos(), which since PHP 8.1 causes a
deprecation message if a null value is passed as first parameter.

This patch changes the value of the null coalescence operator to an
empty string to avoid this deprecation message, and to be compatible
when DBAL changes the parameter type hint to string.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Simon Gilli +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Simon Gilli +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 79

  1. Stefan Bürk uploaded patch set 1 10/23/21, 19:33

  2. Christian Kuhn voted on patch set 1 V +1 CR +1 10/23/21, 19:46

  3. core-ci voted on patch set 1 V +1 10/23/21, 19:49 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18458

  4. Simon Gilli updated the commit message in patch set 2 10/23/21, 20:01

  5. Simon Gilli voted on patch set 2 V +1 CR +1 10/23/21, 20:01

  6. Christian Kuhn voted on patch set 2 V +1 CR +1 10/23/21, 20:04

  7. core-ci voted on patch set 2 V +1 10/23/21, 20:14 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/18462

  8. Christian Kuhn voted on patch set 2 V +2 CR +2 10/23/21, 20:17

  9. Christian Kuhn merged patch set 3 10/23/21, 20:17