Index: modules/node/node.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.947.2.12
diff -u -p -r1.947.2.12 node.module
--- modules/node/node.module	12 Jan 2009 16:02:33 -0000	1.947.2.12
+++ modules/node/node.module	14 Jan 2009 02:33:53 -0000
@@ -1977,7 +1977,9 @@ function node_search_validate($form, &$f
 function node_access($op, $node, $account = NULL) {
   global $user;
 
-  if (!$node) {
+  if (!$node || !in_array($op, array('view', 'update', 'delete', 'create'), TRUE)) {
+    // If there was no node to check against, or the $op was not one of the
+    // supported ones, we return access denied.
     return FALSE;
   }
   // Convert the node to an object if necessary:
