From ac231a24fc0444ae48d057b31c868c454ea3d27b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=92=8C?= <496631085@qq.com> Date: Wed, 15 May 2024 03:03:04 +0000 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=9C=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E4=BC=9A=E6=8A=A5=E9=94=99,=E5=85=BC=E5=AE=B9=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E7=89=88=E6=9C=AC=E7=9A=84php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 小和 <496631085@qq.com> --- application/common/taglib/Tp.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/application/common/taglib/Tp.php b/application/common/taglib/Tp.php index eab3f72..198198b 100644 --- a/application/common/taglib/Tp.php +++ b/application/common/taglib/Tp.php @@ -99,7 +99,7 @@ class Tp extends TagLib { //通用栏目信息 Public function tagCate($tag){ $id = isset($tag['id'])?$tag['id']:"input('catId')"; - $type = $tag['type']?$tag['type']:'catname'; + $type = isset($tag['type'])?$tag['type']:'catname'; $str = 'where("id",'.$id.')->find();'; @@ -113,7 +113,7 @@ class Tp extends TagLib { //通用位置信息 Public function tagPosition($tag,$content){ - $name = $tag['name']?$tag['name']:'position'; + $name = isset($tag['name'])?$tag['name']:'position'; $parse = 'select();'; $parse .= '$__LIST__ = getParents($__CATE__,input(\'catId\'));'; @@ -127,7 +127,7 @@ class Tp extends TagLib { //获取友情链接 Public function tagLink($tag,$content){ - $name = $tag['name']?$tag['name']:'link'; + $name = isset($tag['name'])?$tag['name']:'link'; $parse = 'where(\'status\',1)->order(\'sort ASC,id desc\')->select();'; $parse .= ' ?>'; @@ -268,7 +268,7 @@ class Tp extends TagLib { //详情上一篇 Public function tagPrev($tag){ - $len = $tag['len']?$tag['len']:''; + $len = isset($tag['len'])?$tag['len']:''; $str = '