Spin-off issue from #2811429-10: Switch to feed owner during manual import.
Problem/Motivation
When a state on the feed is explicitly set to NULL for a certain stage and then calling $feed->saveStates(), then $feed->getState() will return NULL for that stage. This is a bug because FeedInterface::getState() isn't supposed to return NULL. It should always return an instance of StateInterface.
Proposed resolution
Check the value that is being get from the Drupal key/value store for the stage and feed in question. If it returns an empty value, then create a new State object.
Remaining tasks
Implement the proposed resolution and commit it if tests are passing.
User interface changes
None.
API changes
None.
Data model changes
None.
Patch will follow.
Comments
Comment #2
megachrizComment #4
megachrizThe tests only patch fails and the patch with the fix passes. Committed #2.