Skip to content

Commit

Permalink
Update RoutesPanel.php
Browse files Browse the repository at this point in the history
Fixed notices popping up because there is no isset check

Migrate fix from #697 to 4.x.
Fixes #726
  • Loading branch information
Modicrumb authored and markstory committed Jan 10, 2020
1 parent e2b02fb commit 586c62b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Panel/RoutesPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RoutesPanel extends DebugPanel
public function summary()
{
$routes = array_filter(Router::routes(), function ($route) {
return $route->defaults['plugin'] !== 'DebugKit';
return (!isset($routes->defaults['plugin'])) || $route->defaults['plugin'] !== 'DebugKit';
});

return (string)count($routes);
Expand Down

0 comments on commit 586c62b

Please sign in to comment.