Bladeren bron

Merge branch '7.x-3.x' of github.com:tripal/tripal into 7.x-3.x

Stephen Ficklin 7 jaren geleden
bovenliggende
commit
e4e2c39c15
1 gewijzigde bestanden met toevoegingen van 4 en 0 verwijderingen
  1. 4 0
      tripal/includes/tripal.entity.inc

+ 4 - 0
tripal/includes/tripal.entity.inc

@@ -275,6 +275,10 @@ function tripal_entity_info_alter(&$entity_info){
  */
 function tripal_entity_property_info_alter(&$info) {
 
+  // Sometimes this function is called when there are no Tripal Entities.
+  // Don't bother to do anything in this case.
+  if (!isset($info['TripalEntity']['bundles'])) { return TRUE; }
+
   // For each Tripal Content Type, we want to ensure all attached fields
   // are added to the bundle properties.
   foreach ($info['TripalEntity']['bundles'] as $bundle_name => $bundle) {