diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index a365993f89..933c126b18 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -91,7 +91,7 @@ public function loadParents($tid) { $terms = []; /** @var \Drupal\taxonomy\TermInterface $term */ if ($tid && $term = $this->load($tid)) { - foreach ($term->getParents() as $id => $parent) { + foreach ($this->getParents($term) as $id => $parent) { // This method currently doesn't return the parent. // @see https://www.drupal.org/node/2019905 if (!empty($id)) {