Skip to content

Commit c1b12af

Browse files
committed
Merge branch '5.x' into 6.x
# Conflicts: # src/fields/Matrix.php
2 parents 800a54e + e5ee018 commit c1b12af

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Fixed an error that could occur when setting up mappings if a field had been deleted, but not removed from the field layout. ([#1687](https://github.com/craftcms/feed-me/pull/1687))
66
- Fixed a bug where some imported assets would end up with a double file extension. ([#1688](https://github.com/craftcms/feed-me/pull/1688))
7+
- Fixed a bug where `setEmptyValues` wasn’t being respected for Matrix Blocks in some scenarios. ([#1689](https://github.com/craftcms/feed-me/pull/1689))
78

89
## 6.10.1 - 2025-08-27
910

src/fields/Matrix.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,11 @@ public function parseField(): mixed
219219
}
220220
}
221221

222-
// if there's nothing in the prepped data, return null, as if mapping doesn't exist
222+
// if there's nothing in the prepped data,
223+
// if setEmptyValues is on, return an empty array so that existing blocks are removed,
224+
// otherwise return null, as if mapping doesn't exist
223225
if (empty($preppedData)) {
224-
return null;
226+
return $this->feed['setEmptyValues'] ? [] : null;
225227
}
226228

227229
$expanded = Hash::expand($preppedData);

0 commit comments

Comments
 (0)