Skip to content
Snippets Groups Projects
Commit 3d0776f2 authored by Stefan Bürk's avatar Stefan Bürk Committed by Christian Kuhn
Browse files

[BUGFIX] Avoid passing null parameter in SchemaColumnDefinitionListener

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.

Resolves: #95743
Releases: master
Change-Id: I95869666cf1c8f798259652cf63bdd8fbfc554fd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/71946


Tested-by: default avatarSimon Gilli <typo3@gilbertsoft.org>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarSimon Gilli <typo3@gilbertsoft.org>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent a255ae77
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment