You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my feed-me.php config file, when setting a property for a specific feed in feedOptions, if I set the value to false, the value is not able to override the default value. This is specifically happening with compareContent, but I believe would happen with any other property if trying to set to false, null, 0, or other "empty" values.
The problem is, if ($configFeedItem) will evaluate to false if the config option is set to a value of false, null, or 0, and will not be allowed to override the existing $configFeedItem variable. There needs to be an additional check to see if the property is set, so that a false or 0 value can be allowed.
I have only tested with compareContent, but I believe the same thing would happen if setting queueMaxRetry or backupLimit to 0, for example.
Steps to reproduce
Create feed-me config file
Set up feedOptions for an existing feed
choose a property whose default value is true (eg. compareContent or logging), and set its value to false in the feedOptions
Run the feed
Additional info
Craft version: 4.4.15
PHP version: 8.0.8
Database driver & version: MySQL 5.7.34
Plugins & versions: Feed Me 5.2.0
The content you are editing has changed. Please copy your edits and refresh the page.
Description
In my feed-me.php config file, when setting a property for a specific feed in feedOptions, if I set the value to false, the value is not able to override the default value. This is specifically happening with compareContent, but I believe would happen with any other property if trying to set to false, null, 0, or other "empty" values.
Here is my config file:
The problem occurs in the getConfig method in craft\feedme\services\Service.php
The problem is, if ($configFeedItem) will evaluate to false if the config option is set to a value of false, null, or 0, and will not be allowed to override the existing $configFeedItem variable. There needs to be an additional check to see if the property is set, so that a false or 0 value can be allowed.
I have only tested with compareContent, but I believe the same thing would happen if setting queueMaxRetry or backupLimit to 0, for example.
Steps to reproduce
Additional info
Tasks
The text was updated successfully, but these errors were encountered: