Skip to content

Commit

Permalink
[BUGFIX] Fix several PHP warnings in PHP 8.1 (FluidTYPO3#1986)
Browse files Browse the repository at this point in the history
Close: FluidTYPO3#1985

Co-authored-by: Claus Due <[email protected]>
  • Loading branch information
derhansen and NamelessCoder authored Oct 23, 2022
1 parent c57839e commit 49863e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function processDatamap_preProcessFieldArray(array &$fieldArray, $table,
// field. Updated value will still be subject to permission checks.
$resolver = $this->getProviderResolver();
foreach ($fieldArray as $fieldName => $fieldValue) {
if (isset($GLOBALS["TCA"][$table]["columns"][$fieldName]["config"]["type"]) && $GLOBALS["TCA"][$table]["columns"][$fieldName]["config"]["type"] === 'flex') {
if (($GLOBALS["TCA"][$table]["columns"][$fieldName]["config"]["type"] ?? '') === 'flex') {
$primaryConfigurationProvider = $resolver->resolvePrimaryConfigurationProvider(
$table,
$fieldName
Expand Down
2 changes: 1 addition & 1 deletion Classes/Integration/HookSubscribers/DynamicFlexForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function getDataStructureIdentifierPreProcess(array $tca, $tableName, $fi
// In the latter case we sacrifice some performance (having to reload the record by UID) in order
// to pass an identifier small enough to be part of GET parameters. This class will then "thaw" the
// record identified by UID to ensure that for all existing records, Providers receive the FULL data.
if ((integer) $record['uid']) {
if ((integer) ($record['uid'] ?? 0) > 0) {
$limitedRecordData = ['uid' => $record['uid']];
} else {
$fields = GeneralUtility::trimExplode(',', $GLOBALS['TCA'][$tableName]['ctrl']['useColumnsForDefaultValues']);
Expand Down

0 comments on commit 49863e9

Please sign in to comment.