From 73d0d66402662dc3e2560e05123ac9de0fa31cf0 Mon Sep 17 00:00:00 2001 From: Seth Shaw Date: Wed, 18 May 2022 08:42:30 -0700 Subject: [PATCH] maxDepth counting should start at 1, not zero --- src/IslandoraUtils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IslandoraUtils.php b/src/IslandoraUtils.php index e5071a05..f81cb747 100644 --- a/src/IslandoraUtils.php +++ b/src/IslandoraUtils.php @@ -714,7 +714,7 @@ class IslandoraUtils { * @param int $current_height * The current height of the recursion. */ - protected function findAncestorsByEntityReference(ContentEntityInterface $entity, array &$context, array $fields = [self::MEMBER_OF_FIELD], int $current_height = 0): void { + protected function findAncestorsByEntityReference(ContentEntityInterface $entity, array &$context, array $fields = [self::MEMBER_OF_FIELD], int $current_height = 1): void { $parents = $this->getParentsByEntityReference($entity, $fields); foreach ($parents as $parent) { if (isset($context['ancestors'][$parent->id()])) {