Skip to content

Commit 7f8b001

Browse files
authored
Merge pull request #1620 from craftcms/bugfix/setEmptyValues-checks
amend checks to see if feed has setEmptyValues set
2 parents d3aa2ba + 2846249 commit 7f8b001

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/fields/DefaultField.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function parseField(): mixed
7171
// if the normalizeValue above returns null, which can happen for e.g. plain text field and a value of a single space
7272
// we also need to ensure that an empty string is returned, not the value as that can be null after normalization
7373
// https://github.com/craftcms/feed-me/issues/1560
74-
if ($this->feed['setEmptyValues'] === 1 && empty($value)) {
74+
if ($this->feed['setEmptyValues'] && empty($value)) {
7575
return '';
7676
}
7777

src/fields/Dropdown.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function parseField(): mixed
6767
}
6868
}
6969

70-
if ($this->feed['setEmptyValues'] === 1 && $value === '') {
70+
if ($this->feed['setEmptyValues'] && $value === '') {
7171
return $value;
7272
}
7373

0 commit comments

Comments
 (0)