Index: includes/entity.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/entity.inc,v
retrieving revision 1.19
diff -u -p -r1.19 entity.inc
--- includes/entity.inc	30 Nov 2010 19:31:46 -0000	1.19
+++ includes/entity.inc	7 Feb 2011 21:02:19 -0000
@@ -170,6 +170,15 @@ class DrupalDefaultEntityController impl
       $revision_id = FALSE;
     }
 
+    // Clean the $ids array to remove non-integer values.
+    if (is_array($ids)) {
+      $ids = array_filter($ids, 'is_numeric');
+    }

     // Create a new variable which is either a prepared version of the $ids
     // array for later comparison with the entity cache, or FALSE if no $ids
     // were passed. The $ids array is reduced as items are loaded from cache,
