Patch for "Invalid arguments...node.module on line 521" bug
fersman4 - May 18, 2008 - 23:52
| Project: | Node comments |
| Version: | 5.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
When I visit /node/12345/view, I get three errors/warnings:
* warning: Invalid argument supplied for foreach() in /home/clients/websites/w_php0/public_html/php0/modules/node/node.module on line 521.
* warning: implode() [function.implode]: Bad arguments. in /home/clients/websites/w_php0/public_html/php0/modules/node/node.module on line 525.
* user warning: 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 /home/clients/websites/w_php0/public_html/php0/includes/database.mysql.inc on line 172.I tracked it down to line 643 (inside nodecomment_render). Apparently, it thinks $cid = 'view'. So the patch slightly changes the if statement.
This work was sponsored by Initsoft, LLC.
| Attachment | Size |
|---|---|
| nodecomment.module.patch | 378 bytes |

#1
Thanks. Committed.
#2
Automatically closed -- issue fixed for two weeks with no activity.
#3
I've got exactly this error but do not have a file called nodecomment.module anywhere in my Drupal 5.5 installation.
So there is nothing to patch ! What to do ?
Thanks.
#4
groberts100: note that the error is actually coming from node.module. This error occurs when a module tries to do a node_load() on a variable that is not a valid node id. So there is somewhere else in your installation that is passing a bad node id to this function. Look up debug_backtrace() and use this to see if you can pinpoint where this is happening.