Closed (won't fix)
Project:
Drupal core
Version:
4.6.2
Component:
node.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2005 at 11:54 UTC
Updated:
4 Nov 2005 at 12:16 UTC
Hi,
When using node_load(array('nid'=>$node)) with a $node that does not exist in database, I've got the following error:
warning: sprintf(): Too few arguments in /var/www/drupal/includes/database.inc on line 154.
user error: Query was empty
query: in /var/www/drupal/includes/database.mysql.inc on line 66.
As there is no test if the query has return a node or not.
A if($node) {} block should be added between lines 366 to 393 in node.module
Comments
Comment #1
chx commentedFrom your description it seems you are calling node_load with an object instead of an int.