Skip to content

Commit

Permalink
Fix assign null to property Widget\Archive::$archiveKeywords (#1738)
Browse files Browse the repository at this point in the history
* Fix assign null to property Widget\Archive::$archiveKeywords

* Fix
  • Loading branch information
sy-records committed Feb 26, 2024
1 parent 0a40b1e commit 3933a23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions var/Widget/Archive.php
Expand Up @@ -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;

Expand Down Expand Up @@ -1023,7 +1023,7 @@ public function header(?string $rule = null)
$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";
Expand Down

0 comments on commit 3933a23

Please sign in to comment.