summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc7
1 files changed, 6 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 358f76103..566c896b9 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -6396,7 +6396,12 @@ function entity_get_info($entity_type = NULL) {
}
}
- return empty($entity_type) ? $entity_info : $entity_info[$entity_type];
+ if (empty($entity_type)) {
+ return $entity_info;
+ }
+ elseif (isset($entity_info[$entity_type])) {
+ return $entity_info[$entity_type];
+ }
}
/**