diff options
Diffstat (limited to 'src/Enums/PathSegmentType.php')
| -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; |
