From e01e8caca31524cfd754b6762e93afb6e284db0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E7=9A=84=E6=A2=A6?= <519468341@qq.com> Date: Sat, 7 Oct 2023 16:02:11 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/think/route/Rule.php.=20thinkphp8.?= =?UTF-8?q?x=E5=AD=98=E5=9C=A8bug=EF=BC=8Cphp8.0.x=20=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=A7=84=E5=88=99=EF=BC=9A=20Route::group('test',=20function?= =?UTF-8?q?=20()=20{=20=20=20=20=20=20=20=20Route::get('',=20'test/index')?= =?UTF-8?q?;=20})=20=20->=20cache(600)=20=E6=8A=A5=E9=94=99=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A6=82=E4=B8=8B=EF=BC=9A=20think\cache\TagSet::set(?= =?UTF-8?q?):=20Argument=20#3=20($expire)=20must=20be=20of=20type=20DateIn?= =?UTF-8?q?terval|DateTimeInterface|int|null,=20string=20given,=20called?= =?UTF-8?q?=20in=20E:\git\myjson\vendor\topthink\framework\src\think\middl?= =?UTF-8?q?eware\CheckRequestCache.php=20on=20line=20102=20=E6=83=85?= =?UTF-8?q?=E5=86=B5=E8=AF=B4=E6=98=8E=EF=BC=9A=20tp6.1.x=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E8=BF=99=E4=B8=AA=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B0tp8=E5=B0=B1=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=BA=86=EF=BC=8C=E4=B8=8D=E7=9F=A5=E9=81=93=E6=98=AF=E4=B8=8D?= =?UTF-8?q?=E6=98=AFPHP8=E7=9A=84=E6=95=B0=E6=8D=AE=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E6=9B=B4=E4=B8=A5=E6=A0=BC=E9=80=A0=E6=88=90?= =?UTF-8?q?=E7=9A=84=E8=BF=98=E6=98=AF=E4=BB=80=E4=B9=88=EF=BC=9F=E9=BA=BB?= =?UTF-8?q?=E7=83=A6=E5=AE=98=E6=96=B9=E6=A0=B8=E5=AE=9E=E4=B8=80=E4=B8=8B?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 我的梦 <519468341@qq.com> --- src/think/route/Rule.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/think/route/Rule.php b/src/think/route/Rule.php index 883a5174..bb13c363 100644 --- a/src/think/route/Rule.php +++ b/src/think/route/Rule.php @@ -457,10 +457,10 @@ abstract class Rule /** * 设置路由缓存 * @access public - * @param array|string $cache 缓存 + * @param array|int $cache 缓存 * @return $this */ - public function cache(array|string $cache) + public function cache(array|int $cache) { return $this->middleware(CheckRequestCache::class, $cache); } -- Gitee