From 481d0e2fcbeff431e35a6e47baadf0ab127f680c Mon Sep 17 00:00:00 2001 From: muzi_ys <1099438829@qq.com> Date: Sun, 7 Aug 2022 21:59:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=9B=A0=E4=B8=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=BA=E7=A9=BA=E5=AF=BC=E8=87=B4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/index/common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/index/common.php b/app/index/common.php index 082b595..62b2338 100644 --- a/app/index/common.php +++ b/app/index/common.php @@ -604,7 +604,7 @@ function tpl_get_advert($type, int $row = 5) if (!$row){ $row = 5; } - return array_slice($advertList,0,$row); + return !empty($advertList)?array_slice($advertList,0,$row):$advertList; } /**