diff --git a/src/system/common.func.php b/src/system/common.func.php index 15c932df..83bd66f7 100755 --- a/src/system/common.func.php +++ b/src/system/common.func.php @@ -409,13 +409,13 @@ function IndexActive($idx) //是否是HTTPS function IsSSL() { - if ($_SERVER['HTTPS'] && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))) { + if (@$_SERVER['HTTPS'] && ('1' == $_SERVER['HTTPS'] || 'on' == strtolower($_SERVER['HTTPS']))) { return true; - } elseif ('https' == $_SERVER['REQUEST_SCHEME']) { + } elseif ('https' == @$_SERVER['REQUEST_SCHEME']) { return true; } elseif ('443' == $_SERVER['SERVER_PORT']) { return true; - } elseif ('https' == $_SERVER['HTTP_X_FORWARDED_PROTO']) { + } elseif ('https' == @$_SERVER['HTTP_X_FORWARDED_PROTO']) { return true; } return false; diff --git a/src/system/database/dedesqlite.class.php b/src/system/database/dedesqlite.class.php index e0f6e36c..c26e6fbc 100755 --- a/src/system/database/dedesqlite.class.php +++ b/src/system/database/dedesqlite.class.php @@ -367,7 +367,7 @@ class DedeSqlite function GetVersion($isformat = TRUE) { global $dsqlite; - if (!$dsqlite->isInit) { + if (!@$dsqlite->isInit) { $this->Init($this->pconnect); } if ($dsqlite->isClose) { diff --git a/src/system/helpers/channelunit.helper.php b/src/system/helpers/channelunit.helper.php index f9eaea47..886b89ae 100755 --- a/src/system/helpers/channelunit.helper.php +++ b/src/system/helpers/channelunit.helper.php @@ -476,9 +476,9 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y') if (DEBUG_LEVEL == TRUE) { $queryTime = ExecTime() - $ttt1; if (PHP_SAPI === 'cli') { - echo '标签:'.$tagname.'载入花费时间:'.$queryTime."\r\n"; + echo '标签:'.$tagname.' 载入花费时间:'.$queryTime."\r\n"; } else { - echo DedeAlert('标签:'.$tagname.'载入花费时间:'.$queryTime, ALERT_WARNING); + echo DedeAlert('标签:'.$tagname.' 载入花费时间:'.$queryTime, ALERT_WARNING); } } diff --git a/src/system/taglib/channelartlist.lib.php b/src/system/taglib/channelartlist.lib.php index 0e18aced..b8ce9f28 100755 --- a/src/system/taglib/channelartlist.lib.php +++ b/src/system/taglib/channelartlist.lib.php @@ -59,11 +59,13 @@ function lib_channelartlist(&$ctag, &$refObj) $pv = new PartView($typeids[$i]['id']); $pv->Fields['typeurl'] = GetOneTypeUrlA($typeids[$i]); //栏目高亮 - if ($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->TypeLink->TypeInfos['id']) ) - { - $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current'; - } else { - $pv->Fields['currentstyle'] = ''; + if (isset($refObj->TypeLink->TypeInfos)) { + if ($typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['id'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['reid'] || $typeids[$i]['id'] == $refObj->TypeLink->TypeInfos['topid'] || $typeids[$i]['id'] == GetTopid($refObj->TypeLink->TypeInfos['id']) ) + { + $pv->Fields['currentstyle'] = $currentstyle ? $currentstyle : 'current'; + } else { + $pv->Fields['currentstyle'] = ''; + } } $pv->SetTemplet($innertext,'string'); $artlist .= $pv->GetResult();