Skip to content

Commit 6bd5806

Browse files
committed
Merge branch '5.x' into 6.x
2 parents 3d891a1 + 958d19e commit 6bd5806

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Fixed a bug where duplicate users could get created when importing entry authors with a matching email address. ([#1612](https://github.com/craftcms/feed-me/pull/1612))
77
- Fixed a bug where importing into a Matrix field with “Use default value” selected, subfields could use the default value in certain scenarios. ([#1613](https://github.com/craftcms/feed-me/pull/1613))
88
- Fixed a bug that could occur on PostgreSQL when using the `setEmptyValues` feed setting. ([#1620](https://github.com/craftcms/feed-me/pull/1620))
9+
- Fixed a bug that could occur when saving empty ("") values if `compareContent` and “Set Empty Values” were both enabled. ([#1621](https://github.com/craftcms/feed-me/pull/1621))
910

1011
## 6.8.0 - 2025-03-14
1112
-

src/helpers/DataHelper.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,17 @@ private static function _compareSimpleValues($fields, $key, $firstValue, $second
454454
return true;
455455
}
456456

457+
// and if everything else failed, we might have a situation where the $fields[$key] value is empty (null)
458+
// in which case Hash::extract will return an empty array and therefore Hash::check fill return false
459+
// and the values won't actually be compared
460+
// @see https://github.com/craftcms/feed-me/issues/1615
461+
if (
462+
array_key_exists($key, $fields) &&
463+
(!is_numeric($firstValue) && !is_bool($firstValue) && empty($firstValue)) &&
464+
(!is_numeric($secondValue) && !is_bool($secondValue) && empty($secondValue))) {
465+
return true;
466+
}
467+
457468
// Didn't match
458469
return false;
459470
}

0 commit comments

Comments
 (0)