Skip to content

Commit

Permalink
[BUGFIX] Remaining PHP 8.0 fixes for acceptance tests
Browse files Browse the repository at this point in the history
This fixes a bunch of PHP 8.0 warnings found by acceptance
testing. image processing and ext:scheduler are affected
for the main part.
This makes the ac test suite green with PHP 8.0. The
gitlab activation and another testing-framework raise
will follow with dedicated patches.
The patch brings an additional acceptance test for
install tool 'Environment->Image Processing' since
this worked well to nail lots of issues with
GifBuilder and friends.

Change-Id: Id22c7636da76778b75f087d20d7b7260cd2637ee
Resolves: #94333
Related: #94057
Releases: master
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/69476
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Bartsch <bo@cedev.de>
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Oliver Bartsch <bo@cedev.de>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
lolli42 authored and bmack committed Jun 14, 2021
1 parent 0641427 commit c72dcdc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Classes/Backend/Shortcut/ShortcutRepository.php
Expand Up @@ -134,7 +134,7 @@ public function getGroupsFromShortcuts(): array
$groups = [];

foreach ($this->shortcuts as $shortcut) {
$groups[$shortcut['group']] = $this->shortcutGroups[$shortcut['group']];
$groups[$shortcut['group']] = $this->shortcutGroups[$shortcut['group']] ?? '';
}

return array_unique($groups);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Search/LiveSearch/LiveSearch.php
Expand Up @@ -183,7 +183,7 @@ protected function findByTable($tableName, $pageIdList, $firstResult, $maxResult
$queryBuilder->andWhere($this->userPermissions);
}

$orderBy = $GLOBALS['TCA'][$tableName]['ctrl']['sortby'] ?? $GLOBALS['TCA'][$tableName]['ctrl']['default_sortby'];
$orderBy = $GLOBALS['TCA'][$tableName]['ctrl']['sortby'] ?? $GLOBALS['TCA'][$tableName]['ctrl']['default_sortby'] ?? '';
foreach (QueryHelper::parseOrderBy((string)$orderBy) as $orderPair) {
[$fieldName, $order] = $orderPair;
$queryBuilder->addOrderBy($fieldName, $order);
Expand Down
4 changes: 2 additions & 2 deletions Classes/Utility/BackendUtility.php
Expand Up @@ -655,7 +655,7 @@ public static function getTCAtypeValue($table, $row)
);
}
$foreignRow = self::getRecord($foreignTable, $foreignUid, $foreignTableTypeField);
if ($foreignRow[$foreignTableTypeField]) {
if ($foreignRow[$foreignTableTypeField] ?? false) {
$typeNum = $foreignRow[$foreignTableTypeField];
}
}
Expand Down Expand Up @@ -2750,7 +2750,7 @@ public static function getModuleData(
$changed = 1;
}
} else {
if ((string)$settings[$key] !== (string)$CHANGED_SETTINGS[$key]) {
if ((string)($settings[$key] ?? '') !== (string)($CHANGED_SETTINGS[$key] ?? '')) {
$settings[$key] = $CHANGED_SETTINGS[$key];
$changed = 1;
}
Expand Down

0 comments on commit c72dcdc

Please sign in to comment.