Closed (fixed)
Project:
Node import
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2009 at 18:52 UTC
Updated:
24 May 2010 at 19:10 UTC
I'm writing support for Ubercarts uc_stock module.
Getting the following when previewing the imported nodes (step 7 I think):
warning: Invalid argument supplied for foreach() in /Users/alex/Sites/apps/drupal-6/sites/usa.kakadu.local/modules/node_import/node_import.inc on line 660.
Line 660 looks like (last one here):
// Preprocess the data as long as the value is not empty and it
// validates.
foreach ((array)$values[$fieldname] as $i => $value) {
foreach ($fieldinfo['preprocess'] as $function) {
Seems on that line you don't check if 'preprocess' exisit before your reference it. Sandwiching an IF statment in there should fix it.
// Preprocess the data as long as the value is not empty and it
// validates.
foreach ((array)$values[$fieldname] as $i => $value) {
if(isset($fieldinfo['preprocess']))
foreach ($fieldinfo['preprocess'] as $function) {
Comments
Comment #1
cpill commentedopps, this should be in the 'node_import' issues :P
Comment #2
cpill commentedComment #3
cpill commentedComment #4
Robrecht Jacques commentedThis has been fixed. Will be included in -rc5. Thanks!
Comment #5
Robrecht Jacques commented