mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
Update thinkphp/library/think/controller/rest.php
资源类型校验正则修正
This commit is contained in:
@@ -39,7 +39,7 @@ abstract class rest
|
|||||||
if ('' == __EXT__) {
|
if ('' == __EXT__) {
|
||||||
// 自动检测资源类型
|
// 自动检测资源类型
|
||||||
$this->_type = $this->getAcceptType();
|
$this->_type = $this->getAcceptType();
|
||||||
} elseif (!preg_match('/\(' . $this->restTypeList . ')$/i', __EXT__)) {
|
} elseif (!preg_match('/\(' . $this->restTypeList . '\)$/i', __EXT__)) {
|
||||||
// 资源类型非法 则用默认资源类型访问
|
// 资源类型非法 则用默认资源类型访问
|
||||||
$this->_type = $this->restDefaultType;
|
$this->_type = $this->restDefaultType;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user