mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 02:01:52 +02:00
Fix assign null to property Widget\Archive::$archiveKeywords (#1738)
* Fix assign null to property Widget\Archive::$archiveKeywords * Fix
This commit is contained in:
parent
0a40b1e7ee
commit
3933a23ad7
@ -114,14 +114,14 @@ class Archive extends Contents
|
||||
/**
|
||||
* 本页关键字
|
||||
*
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
private string $archiveKeywords;
|
||||
private ?string $archiveKeywords = null;
|
||||
|
||||
/**
|
||||
* 本页描述
|
||||
*
|
||||
* @var string
|
||||
* @var string|null
|
||||
*/
|
||||
private ?string $archiveDescription = null;
|
||||
|
||||
@ -1023,7 +1023,7 @@ class Archive extends Contents
|
||||
$header .= '<meta name="twitter:title" property="og:title" itemprop="name" content="'
|
||||
. htmlspecialchars($this->archiveTitle ?? $this->options->title) . '" />' . "\n";
|
||||
$header .= '<meta name="twitter:description" property="og:description" itemprop="description" content="'
|
||||
. htmlspecialchars($this->archiveDescription ?? $this->options->description) . '" />' . "\n";
|
||||
. htmlspecialchars($this->archiveDescription ?? ($this->options->description ?? '')) . '" />' . "\n";
|
||||
$header .= '<meta property="og:site_name" content="' . htmlspecialchars($this->options->title) . '" />' . "\n";
|
||||
$header .= '<meta name="twitter:card" content="summary" />' . "\n";
|
||||
$header .= '<meta name="twitter:domain" content="' . $this->options->siteDomain . '" />' . "\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user