I'm receiving an error in the FeedMe logs: "Trying to access array offset on value of type null - DataHelper.php: 182" while trying to import a value that's "" (empty) while having setEmptyValues set to off for the Feed.
// If setEmptyValues is enabled allow overwriting existing data
if ($feed !== null && $value === "" && $feed['setEmptyValues']) {
return $value;
}
// If setEmptyValues is enabled allow overwriting existing data
if ($value === "" && $feed['setEmptyValues']) {
return $value;
}
The following change resolved my import issue, though I don't have enough test data to confirm if there were unexpected cascading effects: (updated both conditionals since they both reference setEmptyValues though only 182 was needed to fix my import issue)
// If setEmptyValues is enabled allow overwriting existing data
if ($feed !== null && $value === "" && isset($feed['setEmptyValues']) && $feed['setEmptyValues']) {
return $value;
}
// If setEmptyValues is enabled allow overwriting existing data
if ($value === "" && isset($feed['setEmptyValues']) && $feed['setEmptyValues']) {
return $value;
}
Craft CMS: v4.4.5 FeedMe: v5.1.1.1
I'm receiving an error in the FeedMe logs: "Trying to access array offset on value of type null - DataHelper.php: 182" while trying to import a value that's "" (empty) while having setEmptyValues set to off for the Feed.
https://github.com/craftcms/feed-me/blob/ef158858e755fd6fadfa58402a02dfc12bfbb8ce/src/helpers/DataHelper.php#L182
The following change resolved my import issue, though I don't have enough test data to confirm if there were unexpected cascading effects: (updated both conditionals since they both reference setEmptyValues though only 182 was needed to fix my import issue)