Actually, this happens on a 5.1 development site as well as a 5.5 prod. site. I'm having this and another 2 errors that go hand-in-hand with the invalid argument error as follows:

Invalid argument supplied for foreach() in /mnt/drupal/htdocs/modules/node/node.module on line 521.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 query: SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE in /mnt/drupal/htdocs/includes/database.mysqli.inc on line 151.

implode() [function.implode]: Bad arguments. in /mnt/drupal/htdocs/modules/node/node.module on line 525.

These are generated by node.module in the watchdog table, but they seem to originate in other modules that use the node.module. The line number is reported differently for those using database.mysql.inc rather than mysqli.inc, but the error appears to be the same.

I have searched the D site and they are mentioned several times and it seems always in connection with one module or another. In one case, OG forums, the thread states that the issue is fixed and closed. Also a thread in subscriptions states it is fixed. There are a number of other threads stating that the issue is still open and not fixed. I'm trying here to see if this can be elevated from comments that pertain to particular modules since it seems to be a problem not in this or that module but in many of them. At this point, I'm not sure which module or modules in my site is causing the problem. In any case, I think it ought to be addressed more generally since it seems to be cropping up a lot.

Thanks

Comments

bart jansens’s picture

This occurs when node_load() is called with invalid arguments (typically NULL as first argument). node_load could handle this more cleanly but this really is a bug in the calling code.

Find out which module is calling node_load that way and fix the code there.

paul6299’s picture

I know exactly why it occurs. My point is that it is created by quite a few unmodified Drupal modules. For you to tell me to 'fix the code there' is totally ignoring what I am trying to convey here.

vegantriathlete’s picture

I know that this is really old, but I am experiencing this on a client site that is using D5.5. I am tracing it down to doing a search that returns nodes that have a file attachment. Has this been addressed in later versions of D5?

dpearcefl’s picture

Status: Active » Closed (won't fix)

Considering the lack of activity on this issue and that Drupal v5 is no longer supported by fixes or patches, I am going to close this ticket. If this issue still exists and you want to continue to ask for technical support from the community, please reopen and update this ticket.