Merge branch 'liyuchun_fixbug' into 'master'

* Fix bug for cli.

See merge request easycorp/zentaopms!3607
This commit is contained in:
孙广明
2022-05-26 05:45:59 +00:00
2 changed files with 14 additions and 13 deletions
+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');
+1
View File
@@ -204,6 +204,7 @@ class repoModel extends model
{
if($this->post->gitlabHost == '') dao::$errors['gitlabHost'] = sprintf($this->lang->error->notempty, $this->lang->repo->gitlabHost);
if($this->post->gitlabProject == '') dao::$errors['gitlabProject'] = sprintf($this->lang->error->notempty, $this->lang->repo->gitlabProject);
if(dao::isError()) return false;
}
$data = fixer::input('post')