From 62b440494471a8a461872baf67edeecf5856a1f7 Mon Sep 17 00:00:00 2001 From: Jon Leverrier Date: Fri, 15 Mar 2019 15:38:15 +0100 Subject: [PATCH] Changed fallback for customBaseUrl --- src/services/BreadcrumbService.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/services/BreadcrumbService.php b/src/services/BreadcrumbService.php index a8b62a5..63b13e2 100644 --- a/src/services/BreadcrumbService.php +++ b/src/services/BreadcrumbService.php @@ -33,8 +33,7 @@ public function buildBreadcrumb($settings) : array { // get and set settings array $homeTitle = $settings['homeTitle'] ?? 'Home'; - $homeUrl = $settings['homeUrl'] ?? null; - $customBaseUrl = $settings['customBaseUrl'] ?? null; + $customBaseUrl = $settings['homeUrl'] ?? $settings['customBaseUrl'] ?? null; $skipUrlSegment = $settings['skipUrlSegment'] ?? null; $customFieldHandleEntryId = $settings['customFieldHandleEntryId'] ?? 0; $customFieldHandle = $settings['customFieldHandle'] ?? null; @@ -59,8 +58,8 @@ public function buildBreadcrumb($settings) : array $element = ''; // reset baseURL for custom customBaseUrl - if ($homeUrl || $customBaseUrl) { - $baseUrl = $homeUrl ?? $customBaseUrl; + if ($customBaseUrl) { + $baseUrl = $customBaseUrl; } // for each segment in array