diff --git a/app/Utils/Selected.php b/app/Utils/Selected.php index 5eaae74..0073e10 100644 --- a/app/Utils/Selected.php +++ b/app/Utils/Selected.php @@ -6,11 +6,11 @@ class Selected { static function selected($var, $ref) { $testPostsPage = explode('/', $ref); - if ($testPostsPage[1] === 'post') { + if (isset($testPostsPage[1]) && $testPostsPage[1] === 'post') { $ref = '/posts'; } if ($var === $ref) { return 'active'; } } -} +} \ No newline at end of file