[documentation] [Documentation bug] node_load result is described incorrectly

fgm drupal-docs at drupal.org
Sat Aug 12 19:46:16 UTC 2006


Issue status update for 
http://drupal.org/node/78378
Post a follow up: 
http://drupal.org/project/comments/add/78378

 Project:      Documentation
 Version:      <none>
 Component:    Documentation in CVS
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  fgm
 Updated by:   fgm
 Status:       active

The current API reference for node_load says:


Return value
A fully-populated node object.


But it should really say:


Return value
A fully-populated node object representing the first matching node if
one is found, or boolean true otherwise. 

In case the array form for $param is used and does not uniquely specify
a node, the first matching node will be returned, and can vary from one
call to the next.


Why "can vary" ? Because in case of a non-unique node specification in
$param, the query used does not include any ORDER BY clause, so there
is no guarantee of reproducible results.




fgm



More information about the documentation mailing list