Invalid argument supplied for foreach() on creating new node
| Project: | Taxonomy Image |
| Version: | 5.x-1.4 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | minor |
| Assigned: | NancyDru |
| Status: | closed |
Jump to:
I'm using Drupal 5.10 on two different live sites, with Taxonomy Image 5.x-1.4 installed and Views 5.x-1.6. (Mess of other modules on these sites, but not exactly the same mix.) Every so often, on creating a new node (FAQ, Event, Book, or Blog), I get an error of this type:
* warning: Invalid argument supplied for foreach() in /(path to domain)/sites/all/modules/taxonomy_image/contributed/taxonomy_image_node_display/taxonomy_image_node_display.module on line 27.
* warning: Invalid argument supplied for foreach() in /(path to domain)/sites/all/modules/taxonomy_image/contributed/taxonomy_image_node_display/taxonomy_image_node_display.module on line 27.
These are the content types I have associated Taxonomy Image with; some have image files setup in them, some do not. It does not appear to be a serious error, in that the node is accepted into the database and - thus far - always displays correctly. Nor does it happen every single time a new node is created either! (Intermittent.) Thought I would report it, as I couldn't find anything on this kind of error in the issue queue here or in my searches of Drupal's forum. (In case this is one of those odd-ball intermittent things that occurs with a lot of different modules.) Had to go into my database the other day, on the one using Organic Groups, and set it to load after other modules so as to get rid of some errors there. (Noticed how, in my install, everything in that System table has the same weight of zero (0)!!!) Maybe this is connected to those kinds of flaws?

#1
Perhaps this is happening on nodes with no terms selected?
#2
Fix committed to both branches - it will be in the next -dev release.
#3
Automatically closed -- issue fixed for two weeks with no activity.