﻿diff -r -U 3 a/includes/entity.inc b/includes/entity.inc
--- a/includes/entity.inc	2011-10-26 19:53:40.000000000 +0000
+++ b/includes/entity.inc	2011-11-03 02:01:12.000000000 +0000
@@ -160,6 +160,16 @@
   public function load($ids = array(), $conditions = array()) {
     $entities = array();

+    // Clean the $ids array to remove NULL values that can be passed
+    // in from various sources, including menu callbacks.
+    if (is_array($ids)) {
+      foreach ($ids as $key => $id) {
+        if (is_null($id)) {
+          unset($ids[$key]);
+        }
+      }
+    }
+
     // Revisions are not statically cached, and require a different query to
     // other conditions, so separate the revision id into its own variable.
     if ($this->revisionKey && isset($conditions[$this->revisionKey])) { 