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

小組件Bug - 評論模塊異常 #113

Open
moehoshio opened this issue Jan 20, 2025 · 2 comments
Open

小組件Bug - 評論模塊異常 #113

moehoshio opened this issue Jan 20, 2025 · 2 comments

Comments

@moehoshio
Copy link
Contributor

moehoshio commented Jan 20, 2025

配置留言小組件後將會引發異常。

[{
    "type": "comments",
    "len": "1"
}]

錯誤資訊:
Argument 1 passed to Widget\Base\Contents::filter() must be of the type array, null given, called in /usr/themes/G/libs/G.class.php on line 615

return Typecho_Widget::widget('Widget_Abstract_Contents')->filter($db->fetchRow($select));

該方法的調用來源於 components/widgets.php line 76:

 <a href="'.G::getArticleInfo($obj->cid)["permalink"].'">

看來沒有取得正確的來源的cid?

暫時移除了該行,它沒有了問題。

我還有任何能幫上忙的嗎?

typecho 1.2.1 , php 7.4 , G 3.4.1

@youranreus
Copy link
Owner

感谢你的提醒,typecho 从 1.1 版本升级至 1.2 版本中发生了很多接口的改变,我会尝试修复这个问题。

@youranreus
Copy link
Owner

已经于 25d5331 更新,可以下载 v3.4.2 版本尝试下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants