core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php b/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php index 0513fcb..3742363 100644 --- a/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php +++ b/core/lib/Drupal/Core/Breadcrumb/BreadcrumbManager.php @@ -75,16 +75,11 @@ public function applies(RouteMatchInterface $route_match) { * {@inheritdoc} */ public function build(RouteMatchInterface $route_match) { - // Without builders return early. - $sorted_builders = $this->getSortedBuilders(); - if (empty($sorted_builders)) { - return new Breadcrumb(); - } - + $breadcrumb = new Breadcrumb(); $context = array('builder' => NULL); // Call the build method of registered breadcrumb builders, // until one of them returns an array. - foreach ($sorted_builders as $builder) { + foreach ($this->getSortedBuilders() as $builder) { if (!$builder->applies($route_match)) { // The builder does not apply, so we continue with the other builders. continue;