We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc74476 commit 0bfa41dCopy full SHA for 0bfa41d
src/Router.php
@@ -361,12 +361,12 @@ private function getUriArray(string $uri): array
361
if ($array[0] === '') { // If first segment is empty
362
array_shift($array); // trim off first segment
363
}
364
+
365
if (count($array) <= 1) { // If array has 1 or less segments
366
return $array;
367
368
if ($array[count($array)-1] === '') { // If last segment is empty
- array_reverse($array);
369
- array_shift($array); // trim off last segment
+ array_pop($array); // trim off last segment
370
371
372
0 commit comments