diff --git a/includes/common.inc b/includes/common.inc
index 3a3d274..2e79bbc 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -7483,6 +7483,9 @@ function entity_create_stub_entity($entity_type, $ids) {
  * @todo Remove $conditions in Drupal 8.
  */
 function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) {
+  if (!empty($ids)) {
+    _entity_check_ids($ids, $entity_type);
+  }
   if ($reset) {
     entity_get_controller($entity_type)->resetCache();
   }
@@ -7490,6 +7493,20 @@ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset =
 }
 
 /**
+ * Helper function to entity_load.
+ *
+ * Checks for non-string and non-integer ids from the entity array and throws an exception on such non-conformant types
+ */
+function _entity_check_ids($ids, $entity_type) {
+  foreach ($ids as $key => $id) {
+    if (!(is_string($id) || is_int($id))) {
+      throw new Exception(t('Entity id can only be a string or integer, for entity \'%id\' of type \'%type\'',
+        array('%id' => $id, '%type' => $entity_type)));
+    }
+  }
+}
+
+/**
  * Loads the unchanged, i.e. not modified, entity from the database.
  *
  * Unlike entity_load() this function ensures the entity is directly loaded from
