Fix namespace for constants

This commit is contained in:
Visman 2020-10-14 14:06:59 +07:00
parent 4cf5abdd77
commit 328d65465d

View file

@ -83,8 +83,8 @@ class Router
{
$this->baseUrl = $base;
$this->csrf = $csrf;
$this->host = \parse_url($base, PHP_URL_HOST);
$this->prefix = \parse_url($base, PHP_URL_PATH);
$this->host = \parse_url($base, \PHP_URL_HOST);
$this->prefix = \parse_url($base, \PHP_URL_PATH);
$this->length = \strlen($this->prefix);
}
@ -95,7 +95,7 @@ class Router
{
if (
\is_string($url)
&& \parse_url($url, PHP_URL_HOST) === $this->host
&& \parse_url($url, \PHP_URL_HOST) === $this->host
&& ($route = $this->route('GET', \rawurldecode(\parse_url($url, \PHP_URL_PATH))))
&& self::OK === $route[0]
) {