Merge pull request #37 from mrjk990/patch-1

fix regex  to support for non english letters
This commit is contained in:
SteamPixel 2021-01-14 15:07:11 +01:00 committed by GitHub
commit 08538d9097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,9 @@ class Route {
}
}
}
$path = urldecode($path);
// Get current request method
$method = $_SERVER['REQUEST_METHOD'];
@ -81,7 +83,7 @@ class Route {
$route['expression'] = $route['expression'].'$';
// Check path match
if (preg_match('#'.$route['expression'].'#'.($case_matters ? '' : 'i'), $path, $matches)) {
if (preg_match('#'.$route['expression'].'#'.($case_matters ? '' : 'iu'), $path, $matches)) {
$path_match_found = true;
// Cast allowed method to array if it's not one already, then run through all methods