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 ebe23f5 commit 92fe98eCopy full SHA for 92fe98e
src/Routing/Route.php
@@ -411,7 +411,7 @@ private function detectMaskType(): string
411
[, $this->scheme, $path] = $m;
412
return $path;
413
414
- } elseif (substr($this->mask, 0, 1) === '/') {
+ } elseif (str_starts_with($this->mask, '/')) {
415
$this->type = self::Path;
416
417
} else {
@@ -571,7 +571,7 @@ private function parseMask(string $path): void
571
private function parseQuery(array $parts): bool
572
{
573
$query = $parts[count($parts) - 2] ?? '';
574
- if (substr(ltrim($query), 0, 1) !== '?') {
+ if (!str_starts_with(ltrim($query), '?')) {
575
return false;
576
}
577
0 commit comments