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	4 Feb 2011 07:37:32 -0000
@@ -170,6 +170,17 @@ class DrupalDefaultEntityController impl
       $revision_id = FALSE;
     }
 
+    // Clean the $ids array to remove non-integer values, this will result in
+    // an empty return when a string is passed as an identifier in a URL rather
+    // than an error. A notice is raised to avoid silent failure on unexpected
+    // values. 
+    foreach ($ids as $key => $value) {
+      if ($value != (string) (int) $value) {
+        unset($ids[$key]);
+        trigger_error('Non-integer entity id \''.$value.'\'');
+      }
+    } 
+
     // 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,
