Skip to content

Commit 795e32e

Browse files
fix: do not print empty label elements in breadcrumb
1 parent 4f50d65 commit 795e32e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

source/php/Component/Breadcrumb/Breadcrumb.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ private function structureBreadcrumbs()
5656
}
5757
}
5858

59+
if(!is_array($list)) {
60+
return [];
61+
}
62+
63+
$list = array_filter($list, function ($item) {
64+
return !empty($item['label']);
65+
});
66+
5967
return $list;
6068
}
61-
}
69+
}

0 commit comments

Comments
 (0)