Commit 3f9a0500 authored by Omkar Deshpande's avatar Omkar Deshpande Committed by Greg Boggs
Browse files

Issue #3293237 by omkar-pd, cpierce42, thisismax, maxstarkenburg, Greg Boggs,...

Issue #3293237 by omkar-pd, cpierce42, thisismax, maxstarkenburg, Greg Boggs, Martijn de Wit: As of 2.0.3: "Warning: array_key_exists(): The first argument should be either a string or an integer" when encountering page titled via TranslatableMarkup
parent 3417d788
Loading
Loading
Loading
Loading
+2 −1
Changes for src/EasyBreadcrumbBuilder.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -501,9 +501,10 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface {
                    $title = $this->normalizeText($this->getTitleString($route_request, $route_match, $replacedTitles));
                    // Add this entity's cacheability metadata.
                    $breadcrumb->addCacheableDependency($entity);
                    $title = (string) $entity->label();
                    // If the title is to be replaced replaces the title.
                    if (!empty($title) && array_key_exists($title, $replacedTitles)) {
                      $title = $replacedTitles[(string) $title];
                      $title = $replacedTitles[$title];
                    }
                    if ($title && $this->config->get(EasyBreadcrumbConstants::TRUNCATOR_MODE)) {
                      $title = $this->truncator($title);