diff --git a/laravel/request.php b/laravel/request.php index 3476537b..2df0ad32 100644 --- a/laravel/request.php +++ b/laravel/request.php @@ -42,7 +42,7 @@ public static function uri() { $uri = $_SERVER['PATH_INFO']; } - if (isset($_SERVER['REQUEST_URI'])) + elseif (isset($_SERVER['REQUEST_URI'])) { $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); diff --git a/tests/Cases/RequestTest.php b/tests/Cases/RequestTest.php new file mode 100644 index 00000000..69a6f287 --- /dev/null +++ b/tests/Cases/RequestTest.php @@ -0,0 +1,11 @@ +assertEquals('something', Laravel\Request::uri()); + } + +} \ No newline at end of file