diff --git a/sites/all/modules/entity/includes/entity.inc b/sites/all/modules/entity/includes/entity.inc
index 4efd071..e647a9d 100644
--- a/sites/all/modules/entity/includes/entity.inc
+++ b/sites/all/modules/entity/includes/entity.inc
@@ -53,6 +53,9 @@ class Entity {
    * Set up the object instance on construction or unserializiation.
    */
   protected function setUp() {
+    if (!function_exists ( 'entity_get_info' )) {
+          return;
+    }
     $this->entityInfo = entity_get_info($this->entityType);
     $this->idKey = $this->entityInfo['entity keys']['id'];
     $this->nameKey = isset($this->entityInfo['entity keys']['name']) ? $this->entityInfo['entity keys']['name'] : $this->idKey;
@@ -300,6 +303,9 @@ class Entity {
     unset($vars['entityInfo'], $vars['idKey'], $vars['nameKey'], $vars['statusKey']);
     // Also key the returned array with the variable names so the method may
     // be easily overridden and customized.
+      if (!function_exists ( 'drupal_map_assoc' )) {
+          return;
+      }
     return drupal_map_assoc(array_keys($vars));
   }
 
