The call to empty() in the data processor of feeds is overly strict, making zero values exit the function immediately. This patch replaces it with a call to === NULL.

CommentFileSizeAuthor
zero_null.patch749 bytestmcw

Comments

alex_b’s picture

Status: Active » Needs review
imclean’s picture

Status: Needs review » Reviewed & tested by the community

Works for me, thanks. Could probably also use is_null().

imclean’s picture

Come to think of it, does it need this check at all? Inserting an empty or null value could be handy, especially when updating an existing field.

Will do some testing with it removed.

twistor’s picture

Status: Reviewed & tested by the community » Fixed

I went ahead and committed the patch since the use case is valid.

@imclean, did you come up with anything regarding inserting NULL values?

http://drupalcode.org/project/feeds.git/commit/a07f987

imclean’s picture

@twistor, thinking about it some more, it really is up to the db to set a null value. An empty value can still be inserted with the above patch so this pretty much takes care of my concerns.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

p0832414’s picture

Any solution for D7 ? I cannot find where to apply this patch. Any help would be appreciated...

jay-dee-ess’s picture

Version: 6.x-1.0-beta9 » 7.x-2.0-alpha8
Issue summary: View changes

Reopening. I ran into this issue in 7.x

jay-dee-ess’s picture

Version: 7.x-2.0-alpha8 » 6.x-1.0-beta9

Sorry. Reverting back. I now see this is being addressed here: https://drupal.org/node/1107522