1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 21:57:51 +02:00

Use e107::route() to safely get e_ROUTE value.

This commit is contained in:
Cameron
2021-06-01 16:36:09 -07:00
parent 3a71366954
commit 83c52c8bd8

View File

@@ -4079,15 +4079,21 @@ class e107
return null; return null;
} }
/**
public static function route($route) * Set the route or get the current route when $route is null.
* @param string $route
* @return string|null
*/
public static function route($route = null)
{ {
if(defined('e_ROUTE')) if(defined('e_ROUTE'))
{ {
return null; return e_ROUTE;
} }
define('e_ROUTE', $route); define('e_ROUTE', $route);
return null;
} }