Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2开发最新版,使用原有数据全新安装,报错 #1164

Closed
noisky opened this issue Sep 10, 2021 · 3 comments
Closed

1.2开发最新版,使用原有数据全新安装,报错 #1164

noisky opened this issue Sep 10, 2021 · 3 comments
Labels
bug Something isn't working
Milestone

Comments

@noisky
Copy link

noisky commented Sep 10, 2021

1. 该问题的重现步骤是什么?

git clone master分支最新版本,然后全新安装,数据使用开发版1.2 (18.10.23)原有数据,安装后打开博客和后台均提示报错

2. 你期待的结果是什么?实际看到的又是什么?

应该正常访问

3. 问题出现的环境

  • 操作系统版本:WIN10
  • Apache/NGINX 版本:nginx/1.20.1
  • 数据库版本:MySQL v8.0.25
  • PHP 版本:PHP 7.4.20
  • Typecho 版本:master最新
  • 浏览器版本:Microsoft Edge版本 93.0.961.38

安装成功
QQ20210910104657.png

进入前台或后台均报错
QQ20210910105226.png

报错信息

Argument 1 passed to Typecho\Common::fixHtml() must be of the type string, null given, called in /home/noisky/data/wwwroot/ffis.me/typecho-new/var/Widget/Base/Contents.php on line 894
@joyqi joyqi added the bug Something isn't working label Sep 10, 2021
@joyqi joyqi closed this as completed in d839f39 Sep 10, 2021
@joyqi joyqi added this to the v1.2.0-beta.2 milestone Sep 10, 2021
@noisky
Copy link
Author

noisky commented Sep 10, 2021

我这里还是不行,不知道是不是我的数据有问题,现在提示
QQ20210910143004.png

Return value of Widget\Base\Contents::___excerpt() must be of the type string, null returned

并且在安装的时候,我这里数据库不能使用localhost,会报如下错误,使用127.0.0.1则正常,不知道是不是我的服务器配置有问题,我在服务器手动ping localhost是正常的
QQ20210910143225

@joyqi
Copy link
Member

joyqi commented Sep 10, 2021

数据只是引起这个的诱因,根本原因还是现在数据类型限制更加严格,有些类型还没考虑到,我再修复下

@joyqi joyqi reopened this Sep 10, 2021
@joyqi joyqi closed this as completed in 4186cde Sep 10, 2021
@ihewro
Copy link

ihewro commented Jan 15, 2022

image
parse函数被autoP函数调用,autoP 函数参数的$text 可能为 null,parse 函数参数也需要改动一下,
否则现在在文章标题和内容都会空的情况下还会报错
https://github.com/typecho/typecho/blob/master/var/Utils/AutoP.php#L121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants