Closed (fixed)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Oct 2010 at 04:42 UTC
Updated:
9 Nov 2010 at 00:10 UTC
Jump to comment: Most recent file
In field.inc mapper, in field_feeds_set_target it starts out like:
if (empty($value)) {
return;
However, if $value is an integer `0` then empty(0) evaluates to empty and therefore returns instead of mapping the `0` value. Patch to follow.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 949236-6_follow_up.patch | 2.17 KB | Ian Ward |
| #5 | 949236-5_follow_up.patch | 2.24 KB | Ian Ward |
| #4 | 949236-4_follow_up.patch | 2.1 KB | alex_b |
| #2 | feeds-mapper-zero-value-949236-2.patch | 730 bytes | Ian Ward |
| #1 | feeds-mapper-zero-value-949236-1.patch | 901 bytes | Ian Ward |
Comments
Comment #1
Ian Ward commentedI'm not sure this is the best way to handle. If rows are blank, PDO errors are thrown.
Comment #2
Ian Ward commentedAttached is a new patch based on our discussion.
Comment #3
alex_b commentedThis is committed, thank you http://drupal.org/cvs?commit=440162
Comment #4
alex_b commentedOk, we just shot ourselves in the foot: removing the empty check allows for mapping e. g. '' to a numeric which leads to PDO exceptions.
Comment #5
Ian Ward commentedAttached is a re-roll with the 'list' type added to the numeric array. The 'list' field type accepts only numeric keys.
Comment #6
Ian Ward commentedAnother re-roll, which gets rid of notice when $callback is not set
Comment #7
alex_b commentedThanks, Ian.
http://drupal.org/cvs?commit=441514