diff options
| author | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
|---|---|---|
| committer | Sam Light <sam@lightscale.co.uk> | 2026-06-10 19:00:32 +0100 |
| commit | 9e6a18235564df5046c40570a864bcbd5c8bcf62 (patch) | |
| tree | 77bd315671563bfb58c5c4d64c59f2cb91311ca1 /src/Enums | |
| parent | 11beca762b31722e0e6690446f6dabf83bf9dafa (diff) | |
null check
Diffstat (limited to 'src/Enums')
| -rw-r--r-- | src/Enums/PathSegmentType.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Enums/PathSegmentType.php b/src/Enums/PathSegmentType.php index 414b945..d56ad86 100644 --- a/src/Enums/PathSegmentType.php +++ b/src/Enums/PathSegmentType.php @@ -24,7 +24,7 @@ enum PathSegmentType { $type = PathSegmentType::Parameter; $regex = $type->routeMatchRegex(); - if (preg_match($regex, $value, $matches) === 1) { + if (null !== $regex && 1 === preg_match($regex, $value, $matches)) { $value = $matches[1]; } else { $type = PathSegmentType::Raw; |
