mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 23:03:25 +09:00
Support more HTTP methods #2287
This commit is contained in:
parent
f419353013
commit
eb5dd18659
3 changed files with 22 additions and 6 deletions
|
|
@ -180,7 +180,7 @@ class Router
|
|||
}
|
||||
|
||||
// Try the list of routes defined by the module.
|
||||
foreach ($action_info->route->{$method} as $regexp => $action)
|
||||
foreach ($action_info->route->{$method} ?? [] as $regexp => $action)
|
||||
{
|
||||
if (preg_match($regexp, $internal_url, $matches))
|
||||
{
|
||||
|
|
@ -199,7 +199,7 @@ class Router
|
|||
if ($prefix_type === 'mid')
|
||||
{
|
||||
$forwarded_routes = self::_getForwardedRoutes('internal');
|
||||
foreach ($forwarded_routes[$method] ?: [] as $regexp => $action)
|
||||
foreach ($forwarded_routes[$method] ?? [] as $regexp => $action)
|
||||
{
|
||||
if (preg_match($regexp, $internal_url, $matches))
|
||||
{
|
||||
|
|
@ -248,7 +248,7 @@ class Router
|
|||
if ($rewrite_level >= 2)
|
||||
{
|
||||
$global_routes = self::_getForwardedRoutes('global');
|
||||
foreach ($global_routes[$method] ?: [] as $regexp => $action)
|
||||
foreach ($global_routes[$method] ?? [] as $regexp => $action)
|
||||
{
|
||||
if (preg_match($regexp, $url, $matches))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue