From 48d246dbdeae51deef0021020ae61e66a301fadc Mon Sep 17 00:00:00 2001 From: JIbayMcs Date: Thu, 14 Sep 2023 15:01:50 +0200 Subject: [PATCH] (FIX) [Tour]{Routing} Fixed error on getting 'path' from parse_url --- src/Tour/Traits/CanConstructRoute.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Tour/Traits/CanConstructRoute.php b/src/Tour/Traits/CanConstructRoute.php index 65874b1..e290e76 100644 --- a/src/Tour/Traits/CanConstructRoute.php +++ b/src/Tour/Traits/CanConstructRoute.php @@ -35,8 +35,9 @@ public function getRoute($class): array|false|int|null|string } } } else { - $this->route = parse_url($instance->getUrl())['path']; + $this->route = parse_url($instance->getUrl())['path'] ?? '/'; } + } return $this->route;