Commit 0d39a6a8 authored by Benni Mack's avatar Benni Mack Committed by Andreas Fernandez
Browse files

[BUGFIX] Fix PHP 8 warning in TreeDataProvider

Resolves: #99315
Releases: main, 11.5
Change-Id: Ib6bae3be83742212d063bd7b746bb2885d79222b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77560


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 9859535f
......@@ -422,7 +422,7 @@ class DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvide
// Intentional fall-through
case 'select':
case 'category':
if ($this->columnConfiguration['MM']) {
if ($this->columnConfiguration['MM'] ?? false) {
$dbGroup = GeneralUtility::makeInstance(RelationHandler::class);
$dbGroup->start(
$value,
......@@ -433,7 +433,7 @@ class DatabaseTreeDataProvider extends AbstractTableConfigurationTreeDataProvide
$this->columnConfiguration
);
$relatedUids = $dbGroup->tableArray[$this->getTableName()];
} elseif ($this->columnConfiguration['foreign_field']) {
} elseif ($this->columnConfiguration['foreign_field'] ?? false) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
->getQueryBuilderForTable($this->getTableName());
$queryBuilder->getRestrictions()->removeAll();
......
Supports Markdown
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