Skip to content

Commit

Permalink
fix php8 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vvohh committed Jun 8, 2023
1 parent 88fda00 commit f6da303
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [0.22.5] - 2023-06-08
- Fixed: php8 warnings

## [0.22.4] - 2023-06-07
- Fixed: php8 warnings

Expand Down
4 changes: 2 additions & 2 deletions src/Importer/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ protected function applyFieldMappingToSourceItem(array $item, array $mapping): ?
}

if ('source_value' === $mappingElement['valueType']) {
$mapped[$mappingElement['columnName']] = $item[$mappingElement['mappingValue']];
$mapped[$mappingElement['columnName']] = $item[$mappingElement['mappingValue']] ?? null;
} elseif ('static_value' === $mappingElement['valueType']) {
$mapped[$mappingElement['columnName']] = $this->framework->getAdapter(Controller::class)->replaceInsertTags($mappingElement['staticValue']);
}
Expand Down Expand Up @@ -897,7 +897,7 @@ protected function applyFieldFileMapping($record, $item): array
$fileMapping = \Contao\StringUtil::deserialize($this->configModel->fileFieldMapping, true);

foreach ($fileMapping as $mapping) {
if ($record->{$mapping['targetField']} && $mapping['skipIfExisting']) {
if (($record->{$mapping['targetField']} ?? NULL) && $mapping['skipIfExisting']) {
continue;
}

Expand Down

0 comments on commit f6da303

Please sign in to comment.