Skip to content

Commit 24e1da7

Browse files
committed
fix tests
1 parent f611c4f commit 24e1da7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Http/Http.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,11 @@ public function match(Request $request, bool $fresh = true): ?Route
628628
}
629629

630630
$url = \parse_url($request->getURI(), PHP_URL_PATH);
631+
632+
if ($url === null || $url === false) {
633+
$url = '/'; // Default to root path for malformed URLs
634+
}
635+
631636
$method = $request->getMethod();
632637
$method = (self::REQUEST_METHOD_HEAD == $method) ? self::REQUEST_METHOD_GET : $method;
633638

0 commit comments

Comments
 (0)