* Fix bug for cli.

This commit is contained in:
liyuchun
2022-05-26 02:48:59 +00:00
parent 016f55712d
commit 8a008bc17a
+13 -13
View File
@@ -2075,6 +2075,19 @@ class baseRouter
$defaultParams[$name] = $default;
}
/**
* 根据PATH_INFO或者GET方式设置请求的参数。
* Set params according PATH_INFO or GET.
*/
if($this->config->requestType != 'GET')
{
$this->setParamsByPathInfo($defaultParams);
}
else
{
$this->setParamsByGET($defaultParams);
}
if ('cli' === PHP_SAPI)
{
if ($this->params)
@@ -2088,19 +2101,6 @@ class baseRouter
}
else
{
/**
* 根据PATH_INFO或者GET方式设置请求的参数。
* Set params according PATH_INFO or GET.
*/
if($this->config->requestType != 'GET')
{
$this->setParamsByPathInfo($defaultParams);
}
else
{
$this->setParamsByGET($defaultParams);
}
if($this->config->framework->filterParam == 2)
{
$_GET = validater::filterParam($_GET, 'get');