Invalid argument supplied for foreach() in image_fupload_imagefield.module on line 506

troynt - May 10, 2009 - 01:00
Project:Image FUpload
Version:6.x-3.0-rc2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Solution add is_array check before foreach loop.

#1

tevih - May 20, 2009 - 03:37

can you please elaborate on your fix? I'm new at this and I'm having the same issue.

#2

grandcat - June 9, 2009 - 21:47

Can't reproduce this error message. Perhaps you added some fields and didn't resave ImageFields settings page.

#3

sinsinapsi - July 6, 2009 - 17:59

Hi,
get the same error,
really not expert, I'm sorry
but I cannot understand the solution,

"Solution add is_array check before foreach loop."

I get this error below, just after a fresh installation.

Fatal error: Call to undefined function image_node_type_load() in .../modules/image_fupload/image_fupload_imagefield/image_fupload_imagefield.module on line 60

Can someone explain me how work the solution proposed above?

#4

mattyoung - November 4, 2009 - 03:30

I encountered this same error:

warning: Invalid argument supplied for foreach() in /var/www/html/drupal/sites/all/modules/image_fupload/image_fupload_imagefield/image_fupload_imagefield.module on line 506.

I had one image field using the FUpload widget, then I went and edit content type and change the name and id. That's it. Seems under some condition like this, form_fields_destroy() is called with $fields_to_remove == NULL?

 
 

Drupal is a registered trademark of Dries Buytaert.