Skip to content

Commit

Permalink
Prevent Breadcrumbs on 404
Browse files Browse the repository at this point in the history
This fixes the PHP error `Undefined array key 404`. Thought about adding a specific key for that case, but as the content is not found it is obsolete IMO.
  • Loading branch information
ouun authored Apr 20, 2023
1 parent 2c949ff commit 6abbf11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Crumb.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function add($key, $value = null, $blog = false)
*/
public function build()
{
if (is_front_page()) {
if (is_front_page() || is_404()) {
return $this->breadcrumb;
}

Expand Down

0 comments on commit 6abbf11

Please sign in to comment.