Browse Source

verify entity before walking breadcrumb (#786)

pull/788/head
Seth Shaw 4 years ago committed by GitHub
parent
commit
bfab343d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php

3
modules/islandora_breadcrumbs/src/IslandoraBreadcrumbBuilder.php

@ -107,7 +107,8 @@ class IslandoraBreadcrumbBuilder implements BreadcrumbBuilderInterface {
// Find the next in the chain, if there are any.
if ($entity->hasField($this->config->get('referenceField')) &&
!$entity->get($this->config->get('referenceField'))->isEmpty()) {
!$entity->get($this->config->get('referenceField'))->isEmpty() &&
$entity->get($this->config->get('referenceField'))->entity instanceof EntityInterface) {
$this->walkMembership($entity->get($this->config->get('referenceField'))->entity, $crumbs);
}
}

Loading…
Cancel
Save