typecho / typecho

A PHP Blogging Platform. Simple and Powerful.

Home Page:http://typecho.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot assign null to property Widget\Archive::$archiveKeywords of type string

M69W opened this issue · comments

commented

描述这个 Bug

通过 wget https://github.com/typecho/typecho/archive/refs/heads/master.zip 下载源码,
即当前对应的commit https://github.com/typecho/typecho/archive/0a40b1e7eedbb2b015b8a5b14f677fe8eb0eb082.zip
参照【开始升级】,刷新后台,点击升级,后台显示正常。
未设置debug 模式时首页以及文章显示 Server Error, 但后台正常显示

Cannot assign null to property Widget\Archive::$archiveKeywords of type string
TypeError: Cannot assign null to property Widget\Archive::$archiveKeywords of type string in /data/wwwroot/xxx/var/Widget/Archive.php:612
Stack trace:
#0 /data/wwwroot/xxx/var/Typecho/Widget.php(155): Widget\Archive->execute()
#1 /data/wwwroot/xxx/var/Typecho/Router.php(85): Typecho\Widget::widget()
#2 /data/wwwroot/xxx/index.php(23): Typecho\Router::dispatch()
#3 {main}

复现方式

复现的步骤:

  1. 通过 wget https://github.com/typecho/typecho/archive/refs/heads/master.zip 下载源码升级,
    即当前对应的commit https://github.com/typecho/typecho/archive/0a40b1e7eedbb2b015b8a5b14f677fe8eb0eb082.zip
  2. 参照【开始升级
  3. 未设置debug 模式时首页以及文章显示 Server Error, 但后台正常显示
  4. debug 模式时
Cannot assign null to property Widget\Archive::$archiveKeywords of type string
TypeError: Cannot assign null to property Widget\Archive::$archiveKeywords of type string in /data/wwwroot/xxx/var/Widget/Archive.php:612
Stack trace:
#0 /data/wwwroot/xxx/var/Typecho/Widget.php(155): Widget\Archive->execute()
#1 /data/wwwroot/xxx/var/Typecho/Router.php(85): Typecho\Widget::widget()
#2 /data/wwwroot/xxx/index.php(23): Typecho\Router::dispatch()
#3 {main}

期望的结果

简明扼要地描述你期望看到的结果。

截图

如果可以的话,请添加截图或视频以帮助解释你的问题。

平台

  • 操作系统版本:CentOS Linux 8
  • Apache/Nginx 版本:openresty/1.19.9.1
  • 数据库版本:mysql Ver 14.14 Distrib 5.7.35, for linux-glibc2.12 (x86_64) using EditLine wrapper
  • PHP 版本:PHP 8.0.11 (cli) (built: Nov 22 2021 00:52:02) ( NTS )
  • Typecho 版本:1.3.0
  • 浏览器版本:121.0.6167.185

Duplicate of #1737