From 9a5b5245e81db73c3dcf8d109eaf6c13cdee6a4b Mon Sep 17 00:00:00 2001 From: liuzhaowei55 Date: Fri, 11 Dec 2015 15:55:03 +0800 Subject: [PATCH] Update thinkphp/library/think/controller/rest.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 资源类型校验正则修正 --- library/think/controller/rest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/controller/rest.php b/library/think/controller/rest.php index afb0d53d..ce9c7cf6 100644 --- a/library/think/controller/rest.php +++ b/library/think/controller/rest.php @@ -39,7 +39,7 @@ abstract class rest if ('' == __EXT__) { // 自动检测资源类型 $this->_type = $this->getAcceptType(); - } elseif (!preg_match('/\(' . $this->restTypeList . ')$/i', __EXT__)) { + } elseif (!preg_match('/\(' . $this->restTypeList . '\)$/i', __EXT__)) { // 资源类型非法 则用默认资源类型访问 $this->_type = $this->restDefaultType; } else {