summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEltrac Koalar <hi@guhub.cn>2022-11-14 09:28:46 +0800
committerEltrac Koalar <hi@guhub.cn>2022-11-14 09:28:46 +0800
commit322f99aad3936e79f607558c96f680042d2ccfd8 (patch)
tree2e9dfeeba0c3267c116cf3fd96e51053d7eb8ba7
parent6bce70febc0022e4f3083c68cadc85c8a816e1dc (diff)
:bug: Fix: 修复报错
-rw-r--r--includes/head.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/head.php b/includes/head.php
index 4ed156a..5d1bbf7 100644
--- a/includes/head.php
+++ b/includes/head.php
@@ -33,7 +33,7 @@ if($GLOBALS['miraclesIfCompressHTML']=='on') ob_start(); //ob 截取开始 ?>
<meta name="twitter:title" content="<?php Contents::title($this); ?>" />
<meta name="twitter:description" content="<?php if($description != '') echo $description; else $this->excerpt(50); ?>" />
<meta name="twitter:card" content="summary" />
- <meta name="twitter:image" content="<?php if($this->is('post') || $this->is('page')){$this->fields->banner();}
+ <meta name="twitter:image" content="<?php if(($this->is('post') || $this->is('page')) && $this->fields->banner!=''){$this->fields->banner();}
else{
if(empty($this->options->bannerUrl)):
echo Utils::indexTheme('favicon.ico');