--- modules/node.module	Tue Nov  1 06:00:03 2005 1.544
+++ modules/node.module	Thu Nov  3 14:07:51 2005
@@ -2233,7 +2233,15 @@
     $user_object = $user;
   }
 
-  return array_merge(array('all' => array(0)), module_invoke_all('node_grants', $user_object, $op));
+  $node_grants_module = module_invoke_all('node_grants', $user_object, $op);
+  if (is_array($node_grants_module)) {
+    $node_grants = array_merge(array('all' => array(0)), $node_grants_module);
+  }
+  else {
+    $node_grants = array('all' => array(0));
+  }
+
+  return $node_grants;
 }
 
 /**
