This happens when i try to manually run the cron in Status Reports

warning: Invalid argument supplied for foreach() in /var/www/html/kb/modules/taxonomy/taxonomy.module on line 1329.

Comments

gregsumi’s picture

Version: 5.x-dev » 5.7

I too am receiving this same warning message when running Cron manually. I am working off of 5.7.

Any help would be muchly appreciated.

frankp-1’s picture

Title: invalid argument » invalid $node passed to taxonomy functions -- was: invalid argument
Status: Active » Postponed (maintainer needs more info)

I get a similar warning when loading blog/feed:

Invalid argument supplied for foreach() in /var/www/drupal-5.7/modules/taxonomy/taxonomy.module on line 1453

This is occurring at a different line of taxonomy.module from adkatrit's message, but at each point the code is the same:
foreach ($node->taxonomy as $term)

The warning implies that $node->taxonomy is either null or not an array. In my case this invalid $node is being passed to taxonomy_rss_item, and in adkatrit's case it is being passed into the function taxonomy_node_update_index.

Similar reports have occurred before, #62745: missing is_array in taxonomy_rss_item and #90850: "invalid argument" check for taxonomy_rss_item(). On both of these threads, it is suggested to use is_array($node) or isset($node->taxonomy) to check that the argument is valid.

But on #62745: missing is_array in taxonomy_rss_item, Dries comments:

I think $node->taxonomy is always supposed to be an array. Needs more investigation.

Any help or suggestions for where to look for the problem would be appreciated.

dpearcefl’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Considering the time elapsed between now and the last comment plus the fact that D5 is no longer supported, I am closing this ticket.