From 63cd0c77edfb1e17a761e0a7a799b6f952fdd638 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ga=C3=ABlG?= <ggosset@insite.coop>
Date: Wed, 28 Oct 2015 17:30:58 +0100
Subject: [PATCH] Issue #2300139

---
 includes/entity.property.inc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/includes/entity.property.inc b/includes/entity.property.inc
index 38e4fd7..45b1842 100644
--- a/includes/entity.property.inc
+++ b/includes/entity.property.inc
@@ -88,6 +88,14 @@ function entity_get_all_property_info($entity_type = NULL) {
   foreach ($info['bundles'] as $bundle => $bundle_info) {
     $bundle_info += array('properties' => array());
     $info['properties'] += $bundle_info['properties'];
+    // Add property info which might not be available in all instances
+    // of a field property. @see https://www.drupal.org/node/2300139
+    foreach ($bundle_info['properties'] as $name => $property) {
+      if (isset($property['property info'])) {
+        $info['properties'][$name] += array('property info' => array());
+        $info['properties'][$name]['property info'] += $property['property info'];
+      }
+    }
   }
   return $info['properties'];
 }
-- 
1.9.1

